Remove rows with NaN from a table
古いコメントを表示
I have a table T. T has some rows with NaN. I would like to remove any rows with NaN in any entry. Please advise.
採用された回答
その他の回答 (1 件)
Walter Roberson
2018 年 6 月 13 日
T( any(ismissing(T),2), :) = [];
4 件のコメント
alpedhuez
2018 年 6 月 13 日
Paolo
2018 年 6 月 13 日
What does your comment mean? Both solutions work fine and solved your problem. Please mark any answer as accepted.
Walter Roberson
2018 年 6 月 13 日
rmmissing is good, and I did not know about it. I voted for Paolo's answer, but I left mine as an alternative solution.
Blake
2019 年 9 月 19 日
Walter thanks:
For some reason, Pablo's answer didn't work on my data which had mixed data types, but yours did.
カテゴリ
ヘルプ センター および File Exchange で Data Type Identification についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!