[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


From: John W. Eaton
Subject: SUM(X,D)
Date: 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
|                                               12];

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]