NaN in matrix

Xin Dong xdong at cse.unl.edu
Thu May 14 09:54:48 CDT 2009


OK. I searched and I found the solution.

data(isnan(data)) = 0;

Thanks,
Xin

On Thu, May 14, 2009 at 8:45 AM, Xin Dong <xdong at cse.unl.edu> wrote:

> Hi,
>
> I wanna calculate the correlation of a matrix but I got a lot of NaN. I
> guess the problem is that some of the elements are NaN. Because the matrix
> is very big, I can't print it out to check. How can I know if there are NaNs
> in the matrix? And if there are, how can I change them to 0?
>
> Thanks,
> Xin
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090514/b1ead717/attachment-0001.html 


More information about the Help-octave mailing list