MATLAB: How do we eliminated (empty or zeros) Columns or Rows from tables in Matlab

importing excel dataMATLABtable

Dear all
i have read tables using matlab, in my dataset some existed rows and columns are fully empty or contain zero's values, how do we can eliminated these columns or rows from tables , thanks for any suggestion

Best Answer

To eliminate columns fully containing NaN in table t, use
t(:,all(ismissing(t)))=[];
Similar logic for zero values; be careful what you eliminate looks like you could get down to having very little left, perhaps...