Find order of increasing integers
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Sebastian Daneli
am 15 Jun. 2021
Kommentiert: Sebastian Daneli
am 15 Jun. 2021
I have a vector
[3,4,8,9,10,13]
How can I sort this into
[3,4]; [8,9,10]; [13];
in an efficient way? I.e., split the parts of the vector where there is a linear increase of +1 from the previous entry.
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Shifting and Sorting Matrices 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!