필터 지우기
필터 지우기

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)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by