How to convert a scalar to a vector in Simulink?
Afficher commentaires plus anciens
I want to convert a scalar, for example 3, to a vector with dimension 3: [0 0 0]
Is posible this?
4 commentaires
Ryan G
le 20 Mar 2013
Do you mean you want it to be a vector like:
3
to
[3 3 3];
Or a variable length vector? You can define the size of a vector before you start the simulation but not during. Both methods are possible.
Miguel Montilla-DJesus
le 21 Mar 2013
Ryan G
le 21 Mar 2013
This wouldn't really work with a complicated system for a number of reasons, but if your model is simple you can use a series of enabled subsystems that can be enabled when the proper constant is selected.
Miguel Montilla-DJesus
le 22 Mar 2013
Réponses (0)
Catégories
En savoir plus sur Simulink dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!