How to generate c-code from simulink with custom data type? (r2013a)
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi everyone, I would generate c-code from a simple system like that in figure.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/155068/image.png)
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
댓글 수: 0
답변 (1개)
Kaustubha Govind
2014년 3월 20일
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.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Deployment, Integration, and Supported Hardware에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!