www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/SymmetricDifferenceofCharandCellArrayofStringsExample.m
%% Symmetric Difference of Char and Cell Array of Character Vectors % Create a character vector, |A|. A = ['cat';'dog';'fox';'pig']; class(A) %% % Create a cell array of character vectors, |B|. B={'dog','cat','fish','horse'}; class(B) %% % Find the character vectors that are not in the intersection of |A| and % |B|. C = setxor(A,B) %% % The result, |C|, is a cell array of character vectors. class(C)