[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
John W. Eaton
Sun, 17 May 1998 22:58:28 -0500 (CDT)
On 16-May-1998, Alois SCHLOEGL <address@hidden> wrote:
| Matlab allows a second parameter in SUM(X,D)
| That would be nice in Octave, too.
| SUM Sum of elements.
| For vectors, SUM(X) is the sum of the elements of X. For
| matrices, SUM(X) is a row vector with the sum over each
| column. For N-D arrays, SUM(X) operates along the first
| non-singleton dimension.
| SUM(X,DIM) sums along the dimension DIM.
| Example: If X = [0 1 2
| 3 4 5]
| then sum(X,1) is [3 5 7] and sum(X,2) is [ 3
This feature is already on my (long) list of projects. Would anyone
be interested in contributing code? If so, please contact me first as
I have some ideas about how it should be done.
- SUM(X,D), Alois SCHLOEGL, 1998/05/16
John W. Eaton <=