Remove the entire rows of 'Unknown' from a table

1 次查看(过去 30 天)
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

采纳的回答

Adam Danz
Adam Danz 2018-10-9
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), :) = []

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Tables 的更多信息

产品


版本

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by