Matlab 2014b code generation of reference model
이전 댓글 표시
I have problem on code generation by using Matlab 2014b
I want to change function names in source and header file which are generated by matlab 2014b regardless of the name of simulink reference model
For example,
I have reference model "mymodel.slx"
When I generate source code, then I am able to get "mymodel.c" and "mymodel.h"
In "mymodel.c" I have executable function "void mymodel(void)"
However, I want to change function name "void mymodel(void)" to "void absd(void)"
Is it possible?
답변 (1개)
Shravya Kuncha
2019년 3월 22일
0 개 추천
Hi Kangneoung,
Yes you can customize the function names in the source file and header file by either using the Configuration settings or the embedded coder dictionary
Using Configuration settings: You can go to Interface -> Configure model functions -> change the function specification there.
If you have a later version of MATLAB then using the Embedded coder dictionary you can follow the below steps:
1) In the Embedded coder dictionary, you can go to "Function customization template", customize the way you want to name the function.
2) In the code mappings, under the Entry-Point functions, you can assign this template.
Once you generate code, you should be able to see void customizedname(void) instead of void modelName(void)
카테고리
도움말 센터 및 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!