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!