I now have a sparse matrix which is computed by me(coming from a discretization of partial differential equation,I have used mex file ).
for example:A is a 10000 by 10000 sparse matrix.
x=A\b (in which b is a 10000 by 1 matrix).
I have found that there is some Nan in x.I guess maybe A also has some nan.How to judge that A(i,j) is Nan?Thank you all
Subject: How to judge a large matrix containing a Nan?
On 1 Jan, 08:12, "zedong " <zdon...@gmail.com> wrote:
> I now have a sparse matrix which is computed by me(coming from a discretization of partial differential equation,I have used mex file ).
> for example:A is a 10000 by 10000 sparse matrix.
> x=A\b (in which b is a 10000 by 1 matrix).
> I have found that there is some Nan in x.I guess maybe A also has some nan.How to judge that A(i,j) is Nan?Thank you all
ISNAN should tell you whether A contains NaNs. If it does, you would
want to have a look at the mex file which generates A to find out
why they occur.
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central.
Read the complete Terms prior to use.