|MATLAB Function Reference|
k = strcmp(' compares the strings
str2 and returns logical true (
1) if the two are identical, and logical false (
TF = strcmp(S,T)
T is a cell array of strings, returns an array
TF the same size as
1 for those elements of
T that match, and
T must be the same size (or one can be a scalar cell). Either one can also be a character array with the right number of rows.
Note that the value returned by
strcmp is not the same as the C language convention. In addition, the
strcmp function is case sensitive; any leading and trailing blanks in either of the strings are explicitly included in the comparison.
strcmp is intended for comparison of character data. When used to compare numeric data,