Check all values in a table if any is "NAN"
조회 수: 19 (최근 30일)
이전 댓글 표시
I have a table that has multiple column and rows. I want to say if any value in the table was "NAN" then change the value from "NAN" to 1.
Any suggestion?
댓글 수: 2
Rik
2019년 10월 8일
This is not your first question. What have you tried so far on your own? And are you aware of the isnan function?
채택된 답변
the cyclist
2019년 10월 8일
This may work for your case
tbl = fillmissing(tbl,'constant',1);
assuming the NaNs are the only values that count as missing for you.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Tables에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!