Given a process model in a C
S-function
(or a .mexw
file), how can one determine the number of input/output ports together with their port widths programatically in Matlab
(in a .m
script file) without hardcoding them?
Asked
Active
Viewed 578 times
0
1 Answers
1
You can use the same technique as in How can I get signal dimensions in Simulink model for the port widths. I believe the CompiledPortDimensions
property should give you the number of I/O ports. You'll need to compile the model first though.
-
What about finding number of ports and widths for a block from the block diagram library? – remus Nov 25 '13 at 09:51
-
The same applies I believe – am304 Nov 25 '13 at 09:53