%% Compare Two Character Vectors While Ignoring Case
% Compare two different character vectors, ignoring any differences in letter case.

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

%
% strcmpi returns 0 because s1 and s2 are not equal, even when ignoring case.
% Compare two equal character vectors.

s1 = 'Yes';
s2 = 'yes';
tf = strcmpi(s1,s2)

% strcmpi returns 1 because s1 and s2 are equal when ignoring case.
% Copyright 2012 The MathWorks, Inc.