<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/241773</link>
    <title>MATLAB Central Newsreader - How to judge a large matrix containing a Nan?</title>
    <description>Feed for thread: How to judge a large matrix containing a Nan?</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Thu, 01 Jan 2009 07:12:05 -0500</pubDate>
      <title>How to judge a large matrix containing a Nan?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/241773#619452</link>
      <author>zedong </author>
      <description>I now have a sparse matrix which is computed by me(coming from a discretization of partial differential equation,I have used mex file ).&lt;br&gt;
for example:A is a 10000 by 10000 sparse matrix.&lt;br&gt;
x=A\b (in which b is a 10000 by 1 matrix).&lt;br&gt;
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</description>
    </item>
    <item>
      <pubDate>Thu, 01 Jan 2009 07:31:00 -0500</pubDate>
      <title>Re: How to judge a large matrix containing a Nan?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/241773#619454</link>
      <author>Brian Borchers</author>
      <description>On Jan 1, 12:12 am, &quot;zedong  &quot; &amp;lt;zdon...@gmail.com&amp;gt;&lt;br&gt;
&amp;gt;How to judge that A(i,j) is Nan?&lt;br&gt;
&lt;br&gt;
The isnan() function will do this for you.  In particular,&lt;br&gt;
&lt;br&gt;
nnz(isnan(A))&lt;br&gt;
&lt;br&gt;
will tell you how many NaN's are in the matrix A, while&lt;br&gt;
&lt;br&gt;
isnan(A)&lt;br&gt;
&lt;br&gt;
will give you a sparse matrix with 1's in the same positions as the&lt;br&gt;
NaN's in A.</description>
    </item>
    <item>
      <pubDate>Thu, 01 Jan 2009 10:21:15 -0500</pubDate>
      <title>Re: How to judge a large matrix containing a Nan?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/241773#619457</link>
      <author>Rune Allnor</author>
      <description>On 1 Jan, 08:12, &quot;zedong  &quot; &amp;lt;zdon...@gmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; I now have a sparse matrix which is computed by me(coming from a discretization of partial differential equation,I have used mex file ).&lt;br&gt;
&amp;gt; for example:A is a 10000 by 10000 sparse matrix.&lt;br&gt;
&amp;gt; x=A\b (in which b is a 10000 by 1 matrix).&lt;br&gt;
&amp;gt; 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&lt;br&gt;
&lt;br&gt;
ISNAN should tell you whether A contains NaNs. If it does, you would&lt;br&gt;
want to have a look at the mex file which generates A to find out&lt;br&gt;
why they occur.&lt;br&gt;
&lt;br&gt;
Rune</description>
    </item>
  </channel>
</rss>

