%% Merge Variables
% Create a table from workspace variables.

A = [1:3]';
B = [5 11 12]';
C = [3.14 2.72 1.37]';
D = {'a';'b';'c'};
T1 = table(A,B,C,D)

%
% Merge the second and third variables. The new variable has two columns.

T2 = mergevars(T1,[2 3])

% Copyright 2012 The MathWorks, Inc.