To get the CompiledPortDimensions
property of a Simulink Block/Subsystem programmatically via MATLAB, you can make use of the get_param
function.
Here's an example code snippet:
main.m238 chars9 lines
In the code above, we first define the name of the block/subsystem whose CompiledPortDimensions
property we want to obtain. Then, we use the get_param
function to obtain this property value and store it in the portDimensions
variable. Finally, we display the portDimensions
value using the display
function.
Note that when obtaining the CompiledPortDimensions
property, the block/subsystem whose port dimensions you want to obtain should already have been compiled at least once. Otherwise, an error may occur.
gistlibby LogSnag