How to reverse a subarray of an array
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Amine Ne
am 20 Aug. 2018
Kommentiert: Amine Ne
am 20 Aug. 2018
Reversing element order in a selected sub sequence?
Two positions are selected randomly then element positions between these two positions are reversed.
For example: A = [1 2 3 4 5 6 7 8 9 10]; idx = randi(10, 1, 2) = [3 8]; 'A' will be become A = [1 2 8 7 6 5 4 3 9 10]
Thank you
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Array Geometries and Analysis finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!