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!