%% Two Tables
% Create a table A with three rows and two variables.

A = table([5;6;5],['M';'M';'M'],...
    'VariableNames',{'Age' 'Gender'},...
    'RowNames',{'Thomas' 'Gordon' 'Percy'})

% Create a table B with three rows and three variables.

B = table([45;41;40],[45;32;34],{'NY';'CA';'MA'},...
    'VariableNames',{'Height' 'Weight' 'Birthplace'},...
    'RowNames',{'Percy' 'Gordon' 'Thomas'})

% Horizontally concatenate A and B. The order of rows in C matches the order in A.

C = horzcat(A,B)

% Copyright 2012 The MathWorks, Inc.