How do I select some data from a matrix?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Rita
am 28 Mär. 2016
Kommentiert: Rita
am 31 Mär. 2016
I have for example this matrix
A=[2 0.9;
2 0.8;
2 1.0;
2 0.8;
3 0.3;
3 0.7;
3 0.8;
3 0.7]
I want to have just the first two rows of A in each repetition. The "repetition" is in column 1 of A. Here, the repetition is 2 and 3. So B equals:
B=[2 0.9;
2 0.8;
3 0.3;
3 0.7]
Thanks for help.
2 Kommentare
Azzi Abdelmalek
am 28 Mär. 2016
this is not clear, what kind of repetition? only in in first column?
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Tables finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!