Remove rows with NaN from a table
Ältere Kommentare anzeigen
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.
Akzeptierte Antwort
Weitere Antworten (1)
Walter Roberson
am 13 Jun. 2018
T( any(ismissing(T),2), :) = [];
4 Kommentare
alpedhuez
am 13 Jun. 2018
Paolo
am 13 Jun. 2018
What does your comment mean? Both solutions work fine and solved your problem. Please mark any answer as accepted.
Walter Roberson
am 13 Jun. 2018
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
am 19 Sep. 2019
Walter thanks:
For some reason, Pablo's answer didn't work on my data which had mixed data types, but yours did.
Kategorien
Mehr zu Data Type Identification finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!