Dynamically change the number of ports of a block
Show older comments
Hello everyone,
I'm looking for a way to build a Simulink block, where the number of port is defined by the user, e.g. a mask allows the user to define by using a popup the number of input port of the block.
Is there any way to do that ? I know I can define inside a s-function the number of ports
%%Register number of input and output ports
block.NumInputPorts = 1;
block.NumOutputPorts = 1;
but is that the only solution available?
thanks a lot
Accepted Answer
More Answers (0)
Categories
Find more on Simulink 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!