%% Intersection of Arrays of Different Classes and Shapes
% Create a column vector character array.

A = ['A';'B';'C'], class(A)

%
% Create a 2-by-3 matrix containing elements of numeric type double.

B = [65 66 67;68 69 70], class(B)

%
% Find the values common to both A and B.

[C,ia,ib] = intersect(A,B)

%
% intersect interprets B as a character array and returns a character array, C.

class(C)

% Copyright 2012 The MathWorks, Inc.