www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/UnionofCharandCellArrayofStringsExample.m
%% Union of Char and Cell Array of Character Vectors % Create a character vector containing the letters |a| , |b|, and |c|. A = ['a';'b';'c']; class(A) %% % Create a cell array of character vectors containing the letters |c|, |d|, % and |e|. B = {'c','d','e'}; class(B) %% % Combine the elements of |A| and |B|. C = union(A,B) %% % The result, |C|, is a cell array of character vectors. class(C)