Filter löschen
Filter löschen

Splitting a matrix into 2 sub matrices based on row number

1 Ansicht (letzte 30 Tage)
I have a 10x22 matrix, which I need to split into one 6x22 and one 4x22.
I want rows 1, 4, 7, 8, 9, 10 from the 10x22 matrix to become the 6x22 matrix, and the remaining rows to become the 4x22 matrix.
How can I do that?
Thanks!

Akzeptierte Antwort

David Hill
David Hill am 26 Feb. 2020
y=M([1 4 7 8 9 10],:);
z=M([2 3 5 6],:);

Weitere Antworten (0)

Kategorien

Mehr zu Matrices and Arrays 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!

Translated by