필터 지우기
필터 지우기

how to inverse a vector

조회 수: 72 (최근 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 CenterFile Exchange에서 Logical에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by