Why am I getting "double" datatype automatically for every simulink block?
42 ビュー (過去 30 日間)
古いコメントを表示
Upon making minor changes in the simulink model, the simulink blocks are automatically being assigned with the datatype double. Since all the blocks having this datatype, the "DatatypeOverride = Off" option as well as locking the output datatype option are not working. Is it possibly because of the introduction of switch-case block or something else? Kindly help me out.
Thank you.
2 件のコメント
Fangjun Jiang
2024 年 5 月 16 日
The default datatype in MATLAB and Simulink is double. Was it showing something different before making "minor changes"? Were you able to restore and show the data type other than all doubles?
Sanghyo Jeong
2024 年 7 月 2 日
編集済み: Sanghyo Jeong
2024 年 7 月 2 日
I am also getting every variables as double. Casting block doesn't work and affect on any signals.
回答 (1 件)
Divyanshu
2024 年 8 月 1 日
編集済み: Divyanshu
2024 年 8 月 1 日
Hi Kaustubh,
A possible reason that it shows 'double' datatype for all the blocks after adding a 'Switch' block can be the value of parameter 'Output data type' under 'Signal Attributes' tab of block parameters.
If the value is 'Inherit: Inherit via internal rule' then due to attribute propagation it shows 'double' for all the blocks.
This propagation creates an internal loop in the model. To break this loop you can add one or more Signal Specification block.
You can also refer the following MATLAB answer thread which addresses a similar issue:
Hope it helps!
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Simulink Functions についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!