How to determine the dimensions of output signal from a Simulink block programmatically?
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
MathWorks Support Team
el 23 de Feb. de 2018
Respondida: MathWorks Support Team
el 21 de Mzo. de 2018
How to determine the dimension of output signal from a Simulink block programmatically?
Respuesta aceptada
MathWorks Support Team
el 23 de Feb. de 2018
To determine the dimension of output signal from a Simulink block programmatically, please follow these steps:
1. Get the port handles of the required Simulink block. To do this, you can use the "Port Handles" Parameter.
For example:
Handles = get_param('test/Add', 'PortHandles');
This will return a struct. You can isolate Outport handles by accessing it like this :
OutHandles = Handles.Outport
2. You can now use the "CompiledPortDimensions" on the corresponding handle to get the dimensions.
For example:
Dimensions = get_param(Outport, 'CompiledPortDimensions');
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Sources en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!