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

2 次查看(过去 30 天)
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 中查找有关 Creating and Concatenating Matrices 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by