フィルターのクリア

Hi, can anyone help me please? I need a command that can reversed the elements in v? where v is an input.

1 回表示 (過去 30 日間)
Hi, can anyone help me please? I need a command that can reversed the elements in v? where v is an input. Input(‘Give a row vector: ’) Give a (row) vector: [2 5 4 3 4 5 1] Create a new row vector having the reversed meaning that 1 should be replaced by 5, 2 by 4, 3 by 3, 4 by 2 and 5 by 1.

採用された回答

Jan
Jan 2015 年 10 月 26 日
in = [2 5 4 3 4 5 1];
key = max(in):-1:min(in);
out = key(in)
  2 件のコメント
H
H 2015 年 10 月 26 日
thx 4 ur help. appreciated.
Jan
Jan 2015 年 10 月 26 日
I do not see a connection to the original question. Please start a new thread for a new question.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by