MATLAB: Table: Delete rows that contain only zeros

deleteMATLABrowstablezeros

Hi,
I am new to Matlab, but I could not find a solution after a lot of searching. I am trying to erase all rows that contains only zeros in a table (for instance row "topics 1").
I am using a table so I keep the "names" of the rows that should not be deleted for later use.
I am using Matlab Version R2020b.
The original table is attached.
Can anybody help?
Thanks in advance!

Best Answer

mask = all(T{:,2:end}==0,2);
T(mask,:) = [];