How to reverse a subarray of an array
6 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Array Geometries and Analysis 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!