Vector shift block in simulink?

9 ビュー (過去 30 日間)
Jichun Qu
Jichun Qu 2013 年 4 月 19 日
I want to shift vector A = [1 2 3 4 5] to left by one element -> [2 3 4 5 1], is there a block in Simulink to do this? Thanks!

採用された回答

Kaustubha Govind
Kaustubha Govind 2013 年 4 月 19 日
I don't know of such a block in Simulink, but you should be able to use the equivalent MATLAB function circshift in a MATLAB Function block. Another more efficient may might be to use the Demux block followed by the Mux block. Since this is just a re-arrangement of your elements, so you need to connect the outputs of the Demux to the inputs of the Mux in the desired order.
  1 件のコメント
Jichun Qu
Jichun Qu 2013 年 5 月 16 日
Thanks a lot!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeProgrammatic Model Editing についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by