%% Test Data Extracted from Table
% Create a table, T.

T = table(categorical(["M";"F";"M"]),[45 45;41 32;40 34],...
    ["NY";"CA";"MA"],[true;false;false])

%
% Extract the second and fourth variables from T. When you index into a table using smooth parentheses, the result is a table.

T2 = T(:,[2 4])
tf = istable(T2)

%
% Extract data from the second and fourth variables. When you index into a table using curly braces, the result is a matrix, not a table.

A = T{:,[2 4]}
tf = istable(A)

% Copyright 2012-2021 The MathWorks, Inc.