MATLAB: Remove the entire rows of ‘Unknown’ from a table

MATLABnanstringstable

Hello 🙂 I have a table that contains some 'Unknown'. I would like to remove the entire rows of any columns that is 'Unknown'.
Thank you

Best Answer

Assuming the data are stored in a table named ' Valley ', here's how you can remove any rows that contain an ' Unknown '.
Valley(any(strcmp(table2cell(Valley), 'Unknown'),2), :) = []