[OctDev] Function mean() fails with a complex matrix

Søren Hauberg soren at hauberg.org
Thu Mar 5 09:45:00 CST 2009


tor, 05 03 2009 kl. 16:04 +0100, skrev Alois Schlögl:
> Or can You think of any reasonable problem, when mean should propagate
> the NaN's ? I can not. Consequently, there is no need to have both
> nanmean and mean.

I guess this depends on how you interpret NaN. I think it makes sense to
skip NA (not available) when computing mean values. But if NaN is the
result of some faulty calculation somewhere in your program, then it can
be nice to see the NaN's propagate. Otherwise you might never notice you
had a bug.

Søren



More information about the Bug-octave mailing list