Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: repace NaN with zero
Date: Tue, 16 Jun 2009 02:54:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 13
Message-ID: <h171ga$inm$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1245120842 19190 172.30.248.35 (16 Jun 2009 02:54:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 16 Jun 2009 02:54:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1875128
Xref: news.mathworks.com comp.soft-sys.matlab:547760


Hi
I want to replace NaN in the current matrix with 0, what is the fastest way? 
 
A = [ 1 2 NaN; NaN 2 3; NaN NaN 100 ]

A =

     1     2   NaN
   NaN     2     3
   NaN   NaN   100

Thanks
Diego