How to invert the index of a vector in Simulink?

조회 수: 40 (최근 30일)
Dani Tormo
Dani Tormo 2013년 5월 6일
댓글: Rafael Cordero 2020년 6월 17일
It is a simple question but I've been looking for a solution without luck!
Let's say I have this vector:
v = [1 2 3]
And I want this:
v = [3 2 1]
Is there any block that makes that?
Thanks!

채택된 답변

Kaustubha Govind
Kaustubha Govind 2013년 5월 6일
If you have the DSP System Toolbox installed, you can use the Flip block to flip the vector horizontally. If you don't have access to this toolbox, simply use the MATLAB Function block to call fliplr instead.
  댓글 수: 3
Dani Tormo
Dani Tormo 2013년 5월 7일
Thank you both!
Rafael Cordero
Rafael Cordero 2020년 6월 17일
This doesn't work for me. I get the input replicated identically at the output - it's not being flipped.

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

추가 답변 (0개)

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by