How do I best determine if something is "NaN"?

조회 수: 1 (최근 30일)
Arielle
Arielle 2013년 5월 15일
I am calculating the ILU factorization of a matrix (repeatedly over a large number of iterations) and at some point norm(U\(L\A)-eye(n),'fro') evaluates to "NaN" (and therefore GMRES does not work). I would like to catch the code immediately before it calls GMRES when this occurs. What is the best way to ask Matlab to stop when norm(U\(L\A)-eye(n),'fro') is NaN?

채택된 답변

Dr. Seis
Dr. Seis 2013년 5월 15일
See documentation for isnan

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by