Borrar filtros
Borrar filtros

How to generate c-code from simulink with custom data type? (r2013a)

1 visualización (últimos 30 días)
Marco
Marco el 14 de En. de 2014
Respondida: Kaustubha Govind el 20 de Mzo. de 2014
Hi everyone, I would generate c-code from a simple system like that in figure.
My data type should be, for example, MyInt in order to see a generated c-code like this one:
MyInt in1;
Is it possible? Thanks in advance, Marco

Respuestas (1)

Kaustubha Govind
Kaustubha Govind el 20 de Mzo. de 2014
I'm assuming that MyInt is an alias for an integer type? If so, you should be able to use Simulink.AliasType to declare MyInt as an alias, and specify that as the output datatype of your source block. You can also simply use Data Type Replacement if you simply want a specific integer type to show up as 'MyInt' in generated code.

Categorías

Más información sobre Deployment, Integration, and Supported Hardware en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by