Remove rows with NaN from a table
Mostrar comentarios más antiguos
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.
Respuesta aceptada
Más respuestas (1)
Walter Roberson
el 13 de Jun. de 2018
T( any(ismissing(T),2), :) = [];
4 comentarios
alpedhuez
el 13 de Jun. de 2018
Paolo
el 13 de Jun. de 2018
What does your comment mean? Both solutions work fine and solved your problem. Please mark any answer as accepted.
Walter Roberson
el 13 de Jun. de 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
el 19 de Sept. de 2019
Walter thanks:
For some reason, Pablo's answer didn't work on my data which had mixed data types, but yours did.
Categorías
Más información sobre Data Type Identification en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!