Enabling multiple outputs using SIMULINK
46 views (last 30 days)
Show older comments
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 Comment
Adithya Addanki
on 13 Jan 2016
Edited: Adithya Addanki
on 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
Answers (0)
See Also
Categories
Find more on Programmatic Model Editing in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!