Search for pattern in the string str and return the starting index of every such occurrence in the vector idx. If there is no such occurrence, or if pattern is longer than str, then idx is the empty array
[]
.If the cell array of strings cellstr is specified instead of the string str, then idx is a cell array of vectors, as specified above.