How could I cut a matrix into subgroups?
Show older comments
How could I cut a matrix into several small groups according to the 1st column, and I don't know how many subgroups I may get and the size of the subgroups are not the same(rows).
Say I have a matrix,
1 23 34
1 2 3
3 45 76
3 5 66
3 2 7
3 23 32
4 2 2
4 5 27
4 1 0 ....
And finally, I would like to get :
1 23 34
1 2 3
and
3 45 76
3 5 66
3 2 7
3 23 32
and
4 2 2
4 5 27
4 1 0
and ...
How could I do that? Thanks in advance!
Accepted Answer
More Answers (1)
Categories
Find more on Shifting and Sorting Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!