%% Compare Two Character Vectors
% Compare two different character vectors.

s1 = 'Yes';
s2 = 'No';
tf = strcmp(s1,s2)

% strcmp returns 0 because s1 and s2 are not equal.
%
% Compare two equal character vectors.

s1 = 'Yes';
s2 = 'Yes';
tf = strcmp(s1,s2)

% strcmp returns 1 because s1 and s2 are equal.
% Copyright 2012 The MathWorks, Inc.