Use of DataTypeOverride with Embedded Matlab Function
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi, we are using the Code Generation to create Code for our DSP from Simulink models. To increase calculation time on the DSP, we are setting DataTypeOverride to true, applying to all Floating-Point numbers. This works very fine so far. Now unfortunately, one of my colleagues uses a lot of embedded M-functions in his models, where sometimes he is assigning a number directly to a variable, e.g. y = 1; Now it seems like the DataTypeOverride function does not work on the number, because we get an error message "single ~=double". I guess the "1" is interpreted as a double. As soon as we multiply it with a Floating-Point Input to that function, or with a Parameter out of the workspace, e.g. y = 1*Param; it works. Does anyone know if it is possible to override all general numbers in embedded M-Functions also to singles? Or do we need that workaround as described? Thanks Tobias
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Code Generation and Deployment에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!