Borrar filtros
Borrar filtros

Use of DataTypeOverride with Embedded Matlab Function

1 visualización (últimos 30 días)
Tobias Gemaßmer
Tobias Gemaßmer el 5 de Ag. de 2015
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

Respuestas (0)

Categorías

Más información sobre Code Generation and Deployment en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by