[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SUM(X,D)
From: |
Alois SCHLOEGL |
Subject: |
SUM(X,D) |
Date: |
Sat, 16 May 1998 21:02:23 +0200 |
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];
Regards,
Alois
P.S.: find more matlab related stuff at
http://www-dpmi.tu-graz.ac.at/~schloegl/matlab/
- SUM(X,D),
Alois SCHLOEGL <=