The function "mean" in 3.0.1:
John W. Eaton
jwe at octave.org
Fri Jul 10 23:13:03 CDT 2009
On 10-Jul-2009, Dave Goel wrote:
| octave:127> version
| ans = 3.0.1
| octave:128> a=[1 2 3]
| a =
|
| 1 2 3
|
| octave:129> b=mean(a,[])
| b =
|
| 1 2 3
|
| The ansnwer should have been 2 per the documention, which says that
| the dimension is by default taken to be the first dimension with >1
| elements:
|
| DIM dimension
| 1 MEAN of columns
| 2 MEAN of rows
| N MEAN of N-th dimension
| default or []: first DIMENSION, with more than 1 element
|
|
|
| The function mean is found here for my octave:
|
| `/usr/share/octave/packages/nan-1.0.6/mean.m'
| which comes from the debian package octave-nan.
So the bug is not in Octave, but a function from a package. You
should report the problem to the package maintainer.
jwe
More information about the Bug-octave
mailing list