how to inverse a vector
72 次查看(过去 30 天)
显示 更早的评论
I have a vector that is created in decresing order.
Example: v: [10; 9 ;8;7...;1]
However I nead him in increasing order, and I can'y seem to find a simple matlab command to achieve this.
Any help
0 个评论
采纳的回答
James Tursa
2012-8-1
For reversing the elements even if they are not sorted:
v(end:-1:1)
or
flipud(v) % or use fliplr for a row vector
0 个评论
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!