MATLAB: Working with Excel Tables and Importing them.

dataexceltable

After I import the table from Excel, how can I make a new table with only the names of the columns that you input somewhere?

Best Answer

mask = ismember(YourTable.Properties.VariableNames, ListOfColumnsYouWant);
NewTable = YourTable(:,mask);