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: Average value of rows with certain columns
Replies: 4   Last Post: Apr 5, 2013 5:01 PM

Advanced Search

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

Watch Watch this User
Average value of rows with certain columns
Posted: Apr 4, 2013 5:47 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hello everybody,

I have a huge matrix (size 1048766 x 2) and I would like to get average values of particular rows which have identical column values such as:

B=

2 45
3 45
4 45
5 50
3 50

desired result:
res=

3 45
4 50

Columns are already sorted in ascending order.

I am new to MATLAB and unfortunately I couldn't find any efficient solution to this problem. Any help would be really appreciated, thank you very much for your time!



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.