Get expected DataType for Inherit:auto port

9 visualizaciones (últimos 30 días)
Iliya Valchev
Iliya Valchev el 20 de Ag. de 2020
Comentada: Iliya Valchev el 20 de Ag. de 2020
Hi,
I am trying to find out if there is a way programatically to check which is the expected data type of a port which is normally defined as Inherit:auto. The only parameter which lists the data type I know of is "OutDataTypeStr" which in such cases only says "Inherit:auto". Is there a programatic way to apply the inheritance rules and check what is the expected type for this port?

Respuesta aceptada

stozaki
stozaki el 20 de Ag. de 2020
Hello Iliya,
Simulink blocks output data type are determined when you compile your model.
To get the data type property at that time, pose the model with the model compiled and get the property. After getting the property, terminate the model compilation.
I have attached a sample program, so please refer to it.
Regards,
stozaki
  4 comentarios
stozaki
stozaki el 20 de Ag. de 2020
Hi
'vdp' is the shipping demo model name. Please set 'your model name'.
Regards,
stozaki
Iliya Valchev
Iliya Valchev el 20 de Ag. de 2020
Oops, my bad :) Works like a charm. Thanks!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Programmatic Model Editing en Help Center y File Exchange.

Productos


Versión

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by