how to inverse a vector

99 ビュー (過去 30 日間)
Karel
Karel 2012 年 8 月 1 日
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

採用された回答

James Tursa
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

その他の回答 (1 件)

Matt Kindig
Matt Kindig 2012 年 8 月 1 日
編集済み: Matt Kindig 2012 年 8 月 1 日

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

タグ

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by