How to know if a matrix has nan?
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi,
I have a huge matrix or table with doubles. But there might be nan in it. How do I know if there are any nan in it? I know I can use ismissing TF = ismissing(A); But TF is a huge matrix with many 0's in it. I am not sure if there are any 1's.
Thanks!
댓글 수: 0
채택된 답변
Star Strider
2016년 12월 5일
To find the number of NaN values, I would do this:
NrNaN = sum(isnan(A(:)));
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!