Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!news2.google.com!news.glorb.com!news2.glorb.com!tr22g12.aset.psu.edu!news.mathforum.org!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: HOWTO: Accelerate processing algorithm
Date: Sun, 05 Jul 2009 12:28:15 EDT
Organization: The Math Forum
Lines: 7
Message-ID: <24719553.76102.1246811326917.JavaMail.jakarta@nitrogen.mathforum.org>
References: <19990901.76079.1246810695595.JavaMail.jakarta@nitrogen.mathforum.org>
NNTP-Posting-Host: nitrogen.mathforum.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: support1.mathforum.org 1246811326 7828 144.118.30.135 (5 Jul 2009 16:28:46 GMT)
X-Complaints-To: news@news.mathforum.org
NNTP-Posting-Date: Sun, 5 Jul 2009 16:28:46 +0000 (UTC)
Xref: news.mathworks.com comp.soft-sys.matlab:552902


Ok, easy enough

S(isnan(S)) = 0

solves the problem, and allows to get the same result returned by @mean, but much faster!

Jose