-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jaroslav Hajek wrote: > On Thu, Mar 5, 2009 at 9:31 AM, Alois Schlögl <[email protected]> > wrote: >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> >> I was digging in my old files and found the attached version of >> sumskipnan for an oct-file. It considers complex numbers, but fails at >> line 198, which should combine he real and the imaginary part in one >> complex matrix. Has anyone a clue how to do this in the correct way ? >> >> Alois >> > > Is this function really needed? I mean, stuff like "nansum" can easily > be implemented using something like. > > x(isnan(x)) = 0; > y = sum(x,dim)
> > True, this will make a copy of the matrix, but is that so painful? sumskipnan counts also the number of non-NaNs. [s,c]=sumskipnan(...) computing both s and c in a single step is beneficial for estimating mean, variance and other statistics. > > Besides, I think the fact that the NaN package shadows Octave's > built-in functions is very dangerous and confusing, even though I > understand the motivation. I think this package should not be > installed by default. Where do you see a danger ? Please explain. Cheers, Alois > > cheers > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkmvnNwACgkQzSlbmAlvEIhv6gCdEtL++JiM9m1lfn+oF0kgsVuo mTQAnjifyYPuc1zU1Pt2N8bNFGxME63v =E5Kw -----END PGP SIGNATURE----- ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Octave-dev mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/octave-dev
