www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/UnionofVectorsofDifferentClassesandShapesExample.m

    %% Union of Vectors of Different Classes and Shapes  

%% 
% Create a column vector character array. 
A = ['A';'B';'C']

%%
class(A)  

%% 
% Create a row vector containing elements of numeric type |double|. 
B = [68 69 70]

%%
class(B)  

%% 
% The |union| of |A| and |B| returns a column vector character array. 
C = union(A,B)

%%
class(C)