How to rotate a vector

조회 수: 4 (최근 30일)
Guendouz walid
Guendouz walid 2023년 1월 23일
댓글: Guendouz walid 2023년 1월 23일
Hello ! I wonder if anyone has an elegant way to rotate a vector to create symmetry for Example:
[110 120 130 140 150 160 180]
to
[180 160 150 140 130 120 110]
Thanks in advance!
Walid

채택된 답변

Askic V
Askic V 2023년 1월 23일
이동: Fangjun Jiang 2023년 1월 23일
If you want to reverse elements, then just use flip function.
v = 1:10
v = 1×10
1 2 3 4 5 6 7 8 9 10
v_f = flip(v)
v_f = 1×10
10 9 8 7 6 5 4 3 2 1
  댓글 수: 1
Guendouz walid
Guendouz walid 2023년 1월 23일
thank you very much.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Interactions, Camera Views, and Lighting에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by