How to invert the index of a vector in Simulink?

38 ビュー (過去 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 Center および File ExchangeString についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by