drop a column from a table in matlab

Assuming you have a table T and you want to drop the column named columnName, you can use the removevars function:

main.m
T = removevars(T, 'columnName');
33 chars
2 lines

This will create a new table with the columnName column removed from T. Alternatively, you can modify the original table in-place using:

main.m
T(:, 'columnName') = [];
25 chars
2 lines

This will remove the columnName from the original table T.

related categories

gistlibby LogSnag