How to collapse rows of a table?
Ältere Kommentare anzeigen
Hi,
I have a table with 3 columns but many rows. Some rows are the same on column 1 and 2 but but not on column 3. Since column 3 are numbers, how to collapse the table with rows that have the same col 1 and col2 and average on col 3?
For example, the table is
Symbol Date Price
NFLX 7/28/2015 100
NFLX 7/28/2015 101
AAPL 7/28/2015 150
I would like to make it as two rows:
NFLX 7/28/2015 105
AAPL 7/28/2015 150
How to do that?
Thanks for any help!
Jennifer
1 Kommentar
Sean de Wolski
am 24 Aug. 2015
Netflix should be 100.5 for the example.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Language Fundamentals finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!