Array element rearrange without using conditional statement?
Ältere Kommentare anzeigen
Hi all,
I ahve a Array say A = [1 2 3 4 5 10 13 16 17 8 20 7 23 34 15];
I want to keep the position of first 5 elemnts of A unchanged. Now if any element of A don't satisfy thie following condition will come after the first 5 elements. following conditional statement are 10≤A≤16, 20≤A≤34. those elements whis are not satisfying the following condition will come before the satisfying array elements.
However, I want to see like this
A = [1 2 3 4 5 17 8 7 10 13 16 15 20 23 34 ]
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Multidimensional 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!