Enabling multiple outputs using SIMULINK

46 vues (au cours des 30 derniers jours)
Sultan
Sultan le 11 Jan 2016
Is there anyway I can enable multiple outputs in a model in SIMULINK ? Its like I'm making a subsystem comprising of the blocks In1,Complex to Magnitude-Angle, Out2,Out3. This system allows me to get 2 outputs and similarly if I want to have more outputs I just simply add the Complex to Mag-Angle block to the path.So when I setup Mask for the subsystem I can initialize two outputs. I want to make a drop-down menu (input field) in mask so as to enable the desired outputs, whether it may be 2 or 3 and by doing so only the desired outputs are initialized or active.
I have been following the example mentioned on:
But I'm unable to replicate it for the outputs.
  1 commentaire
Adithya Addanki
Adithya Addanki le 13 Jan 2016
Modifié(e) : Adithya Addanki le 13 Jan 2016
Hi Sultan,
I think you are in the right direction of achieving it. However, you may need to modify the callback code a bit in your case.
You will need to initialize the mask and in the callback corresponding, you need to make use of the "add_block" and "add_line" functions to add the out blocks and connect them to relevant ports. The number of blocks may be dependent on the value you set.
Thank you,
Adithya

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Programmatic Model Editing dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by