I would like to convert data of double type to single type before code generation in 2020A Simulink, without using Cast blocks on most functions.

2 次查看(过去 30 天)
I would like to do this without using Cast blocks on most functions.

采纳的回答

Fangjun Jiang
Fangjun Jiang 2023-3-7
  3 个评论
Fangjun Jiang
Fangjun Jiang 2023-3-7
The code generated after running set_param(gcs, 'DataTypeOverride', 'Single') shows using real32_T, which is float (single).
Scott McNeil
Scott McNeil 2023-3-8
Thank you Fangjun Jiang. This was very helpful to get our model into Single Floating point which was very helpful to the Software coding process. I have also learned that changing to Fixed point types requires much more involvement during the code generating process. Some of the tools shared in the article were very good to learn.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Simulink 的更多信息

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by