max (matrix, DIM) does not behave as advertised
Francesco Potortì
Potorti at isti.cnr.it
Wed Nov 12 05:45:04 CST 2008
>that is already present sufficient.. The text you referred to said "For
>a matrix argument".. meaning a single matrix argument.
For a vector argument, return the maximum value. For a matrix
argument, return the maximum value from each column, as a row
vector, or over the dimension DIM if defined. For two matrices (or
a matrix and scalar), return the pair-wise maximum.
Here is what I read:
1) if there is a single vector arg, retrun its max
2) if there is a single matrix arg, return column-wise max, or dim-wise
max if argument DIM is there
3) if there are two matrices, or a matrix and a scalar ...
I guess that, for one more familiar with Octave than I am, this should
be sufficient. But if a user like me gets into confusion, I think the
help string should be more clear. This should suffice, if correct:
For a vector argument, return the maximum value. For a matrix
argument, return the maximum value from each column, as a row
vector, or over the dimension DIM: in this case, the second
argument should be an empty matrix. For two matrices (or a matrix
and scalar), return the pair-wise maximum.
--
Francesco Potortì (ricercatore) Voice: +39 050 315 3058 (op.2111)
ISTI - Area della ricerca CNR Fax: +39 050 315 2040
via G. Moruzzi 1, I-56124 Pisa Email: Potorti at isti.cnr.it
(entrance 20, 1st floor, room C71) Web: http://fly.isti.cnr.it/
More information about the Bug-octave
mailing list