From: Keyur Patel on 3 Aug 2010 20:33 I am attempting to sum certain rows from a matrix that is 36192x222. I was thinking about using loops, because I only want the sum of certain rows. If you can give tips or examples on this that would be great.
From: Walter Roberson on 3 Aug 2010 20:36 Keyur Patel wrote: > I am attempting to sum certain rows from a matrix that is 36192x222. > I was thinking about using loops, because I only want the sum of certain > rows. > If you can give tips or examples on this that would be great. sum([4 15 992],:,2) would result in a 3 x 1 column vector containing the row sums of the 4th, 15th, and 992'nd rows.
From: Jan Simon on 3 Aug 2010 20:55 Dear Keyur, dear Walter > > I am attempting to sum certain rows from a matrix that is 36192x222. > > I was thinking about using loops, because I only want the sum of certain > > rows. > > sum([4 15 992],:,2) I assume this is meant: X = rand(36192, 222); S = sum(X([4, 15, 992], :), 2); Jan
|
Pages: 1 Prev: table modification Next: modelling class d amplifiers in simulink |