Fixed Point Scaling for RSim Executables
정보
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
이전 댓글 표시
I have a complex simulation model that is used for transient analysis of non-linear systems. I have compiled the model with the rsim target for use as a standalone executable. My intention is to use the model's parameter structure to allow all parameter values (a large number) to be varied prior to each simulation run. The parameters are defined as a number of different data types including fixed point data types with a variety of scaling.
I am able to overwrite parameters in the parameter structure and simulate the executable after using the 'AddTunableInfo' option with rsimgetrtp. However, I am unable to identify the fixed point scaling of each parameter value in the structure. Does anyone know a way of identifying the scaling so that values can be correctly changed in the .exe??
댓글 수: 0
답변 (1개)
Kaustubha Govind
2011년 4월 28일
0 개 추천
"The Simulink Coder software reports a tunable fixed-point parameter according to its stored value. For example, an sfix(16) parameter value of 1.4 with a scaling of 2^-8 has a value of 358 as an int16."
So it looks like you can't use the parameter structure to identify the scaling.
댓글 수: 0
이 질문은 마감되었습니다.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!