TF = strcmp(string,string)
TF = strcmp(string,cellstr)
TF = strcmp(cellstr,cellstr)
注:string: A single character string or n-by-1 array of strings;
cellstr: A cell array of strings.
Example:
1、strcmp('Yes', 'No')
A = {'Handle Graphics', 'Statistics'; ... ' Toolboxes', 'MathWorks'}; B = {'Handle Graphics', 'Signal Processing'; ... 'Toolboxes', 'MATHWORKS'};
match = strcmp(A, B) match = 1 0 0 0
3、
A = {'Handle Graphics', 'Statistics'; ... ' Toolboxes', 'MathWorks'}; B = {'Handle Graphics'};
match = strcmp(A, B) match = 1 0 0 0
文章评论(0条评论)
登录后参与讨论