Find NaN elements in a matrix
이전 댓글 표시
Hi Guys,
How can I find the exact location of NaN elements in a matrix. I work with really large arrays (size 1500*200).
How can I find which row has a NaN value in a column matrix or vice versa.?
Thanks
N
채택된 답변
추가 답변 (3개)
Wayne King
2011년 10월 12일
One way:
X = ones(10,4);
X(3,4) = NaN;
indices = find(isnan(X) == 1);
[I,J] = ind2sub(size(X),indices);
Elizabeth Drybrugh
2018년 5월 3일
편집: Elizabeth Drybrugh
2018년 5월 3일
Do this to get the sum
sum(isnan(x))
For other functions, it depends on what you actually need....
카테고리
도움말 센터 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!