'Matlab Coder' generated code is NEVER of double type (only real_T)
Mostrar comentarios más antiguos
I'm trying to convert a piece of matlab code into C++ code. I have one large vector (100+ elements) as input and one large vector as the output. Now, when I try to build the code using the Matlab Coder, while explicitly specifying that the input variable (u) is a DOUBLE, Matlab just seems to ignore my demands and does its own thing by creating the function with input variable of the type const real_T type instead.
This would not be so bad except that I need to use the resulting code with the Legacy_Code function in order to create an S Function. What can I do?
[Attached screenshot shows what is wrong]
Respuesta aceptada
Más respuestas (3)
Ryan Livingston
el 5 de Dic. de 2013
2 votos
Also if you are using MATLAB Coder in R2013b, you can request that C built-in types be used in the generated code for LIB, DLL and EXE targets:
That will use 'double' rather than 'real_T' in the generated code.
Viren
el 4 de Dic. de 2013
0 votos
Viren
el 5 de Dic. de 2013
0 votos
1 comentario
Ryan Livingston
el 13 de Dic. de 2013
Good to hear that you found some utility here.
Categorías
Más información sobre Simulink Coder en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!