How to invert the index of a vector in Simulink?

21 次查看(过去 30 天)
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.

更多回答(1 个)

Ajay Pattassery
Ajay Pattassery 2025-12-17,5:30
You can use "Math Function" block and select "Function" as "transpose".
This block is available in base MATLAB.

产品

Community Treasure Hunt

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

Start Hunting!

Translated by