Effacer les filtres
Effacer les filtres

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

3 vues (au cours des 30 derniers jours)
Arielle le 15 Mai 2013
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?

Réponse acceptée

Dr. Seis
Dr. Seis le 15 Mai 2013
See documentation for isnan
  1 commentaire
Arielle le 15 Mai 2013
Excellent. Thank you.

Connectez-vous pour commenter.

Plus de réponses (0)


En savoir plus sur Logical dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by