- This can be achieved using Dynamic Masked Subsystems, which are masked library blocks that can modify their structural contents. You can find more information about them in the documentation : https://www.mathworks.com/help/releases/R2023b/simulink/ug/create-dynamic-masked-subsystems.html
- You can refer to this article to achieve this specifically for masked subsystems containing S-Functions: https://www.mathworks.com/matlabcentral/answers/97278-can-my-s-function-have-variable-number-of-inputs-and-outputs
Change number of connection ports of a mask depending on user input?
3 views (last 30 days)
Show older comments
I have the following problem in Simulink: I want to change the number of port connections depending on the user input. If the user for example writes the following Parameters into the User Input,
then the block should look like this:
I want to use the block inside a library, so i think it should be written in the callback of the mask, but up to now i haven't found a solution for this.
0 Comments
Answers (1)
Govind KM
on 22 Aug 2024
Hi Bernhard,
As I understand, you want to change the number of input/output port connections based on user input.
Hope this helps!
0 Comments
See Also
Categories
Find more on Author Block Masks in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!