| MATLAB Function Reference |    | 
Syntax
i = strmatch('str',STRS)
i = strmatch('str',STRS,'exact')
Description
i = strmatch(' 找尋在字元陣列或異質字元陣列 str',STRS)
STRS 中是否有某列是以字串 str 為起始,若有,則回傳該列數。當 STRS 為一字元陣列時,strmatch 指令將會最快傳回結果。
i = strmatch(' 回傳在 str',STRS,'exact')
STRS 中完全對應等同於字串 str 的列數。
Examples
i = strmatch('max',strvcat('max','minimax','maximum'))
將回傳 i = [1; 3],因為第一列及第三列皆以為 'max' 起始字串。
若指令為:
i = strmatch('max',strvcat('max','minimax','maximum'),'exact')
則回傳 i = 1,因為只有第一列和字串 'max' 完全相同。
See Also
strcmp, strcmpi, strncmp, strncmpi, findstr, strvcat
|   | strjust | strncmp |  |