Get DataType from a Simulink Consant Block (datatype is propagated from the output)
1 回表示 (過去 30 日間)
古いコメントを表示
I would like to get the datatype from a Constant block where the datatype is propagated from the output after update.
For example, block A's output is connected to a signal b (double). What is the command to get the datatype from A so it returns "double" and not "Inherit: Inherit from 'Constant value'"?
1 件のコメント
David
2023 年 2 月 17 日
For anyone that needs this, the site below is useful for a short script that can be modified to find the blocks. It requires the model to be compiled, which is easy to achieve as long as you have set up "mex" in MATLAB.
回答 (1 件)
Fangjun Jiang
2023 年 2 月 17 日
Make sure your model can pass model update (no errors). See example below:
f14;%open the example model
f14([],[],[],'compile');
p=get_param('f14/u','CompiledPortDataTypes')
f14([],[],[],'term')
bdclose('f14')
0 件のコメント
参考
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!