However, note that some characters have special meanings in regular expression, so if your search string is completely arbitrary you can't just replacestrfind withregexp. For safety you canregexptranslate the search string.
On the other hand, what's stopping you from writing:
k = strfind(str, 'in); k = k(1);
If writing two instructions instead of one bother you, you can always create your own function:
There are probably better ways to do this but if this is always going to be the string and only the numbers are going to change, you can use strfind() to get the locations of "temp"
Best Answer