Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: sum command
Replies: 1   Last Post: Feb 22, 2013 12:43 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
ladidalimey

Posts: 24
Registered: 8/6/10
sum command
Posted: Feb 22, 2013 11:43 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi,

Is there a way of doing the following using vectorisation.

I have a numeric matrix M, 2 columns x 50 rows.

I want to sum(M(end-20:end,1)) and sum(M(end-10:end,2)).

Can I do this in one sum command?

Thanks,

L.


Date Subject Author
2/22/13
Read sum command
ladidalimey
2/22/13
Read Re: sum command
dpb

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.