Effacer les filtres
Effacer les filtres

Vector shift block in simulink?

7 vues (au cours des 30 derniers jours)
Jichun Qu
Jichun Qu le 19 Avr 2013
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!

Réponse acceptée

Kaustubha Govind
Kaustubha Govind le 19 Avr 2013
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 commentaire
Jichun Qu
Jichun Qu le 16 Mai 2013
Thanks a lot!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Modeling dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by