fre, 07 03 2008 kl. 20:00 +0100, skrev GAIL:
> On 02/29/2008 10:57 AM, Søren Hauberg wrote:
> > Can you try again with the SVN version? (you can download it from
> > http://octave.svn.sourceforge.net/viewvc/*checkout*/octave/trunk/octave-forge/extra/NaN/src/sumskipnan.cc)
> > I've just commited some changes that checks the input. This should
> > remove the errors you're seeing.
> 
> Very good, only that 'mean' now needs an explicit DIM argument:
> 
> octave> mean(0)
> error: invalid conversion from real matrix to real scalar
> error: sumskipnan: second input argument must be an integer
> error: evaluating if command near line 72, column 1
> error: called from `mean' in file `/home/octave/nan-1.0.4/mean.m'
Ahh, sorry about that. For some reason I can't connect to SourceForge so
I can't upload the fix. But please try the attached version, and see if
it fixes things for you.

Also, does anybody know why 'sumskipnan' isn't implemented as
(non-tested code, but you'll get the idea)

function retval = sumskipnan(A, varargin)
  A(isnan(A)) = 0;
  retval = sum(A, varargin{:});
endfunction

? That would be a lot simpler then the C++ implementation, and would
also work for complex matrices.

Søren
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to