|MATLAB Function Reference|
Find one string within another
k = strfind(str,pattern)
searches the string,
str, for occurrences of a shorter string,
pattern, returning the starting index of each such occurrence in the double array,
pattern is not found in
str, or if
pattern is longer than
strfind returns the empty array,
The search performed by
strfind is case sensitive. Any leading and trailing blanks in either
pattern are explicitly included in the comparison.
Use the function
findstr, if you are not certain which of the two input strings is the longer one.