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
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 についてさらに検索

製品

リリース

R2014b

質問済み:

2019 年 2 月 12 日

回答済み:

2019 年 3 月 22 日

Community Treasure Hunt

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

Start Hunting!

Translated by