Get expected DataType for Inherit:auto port

조회 수: 7 (최근 30일)
Iliya Valchev
Iliya Valchev 2020년 8월 20일
댓글: genqiang lan 2024년 9월 14일
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?

채택된 답변

stozaki
stozaki 2020년 8월 20일
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
  댓글 수: 5
Iliya Valchev
Iliya Valchev 2020년 8월 20일
Oops, my bad :) Works like a charm. Thanks!
genqiang lan
genqiang lan 2024년 9월 14일
The idea is really great!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Event Functions에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by