Split array in sub arrays according to growing value in first row
Ältere Kommentare anzeigen
I have an array where the first row has growing intiger numbers. How can I split the array according to those values.
Example: This
[ 1 1 1 2 3 3
x x x x x x
y y y y y y ]
Should become something like this
[ [1 1 1 [2 [3 3
x x x x x x
y y y] y] y y] ]
1 Kommentar
Oleg Komarov
am 7 Apr. 2013
What is the purpose? Splitting arrays is usually not recommended.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Matrices and Arrays 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!