How can I customize generated code with MATLAB Coder R2017b?

2 ビュー (過去 30 日間)
MathWorks Support Team
MathWorks Support Team 2017 年 12 月 28 日
編集済み: MathWorks Support Team 2023 年 4 月 13 日
I would like to customize the names of local or global variables in the generated code. For example, I want to modify the variable name by adding characters either before or after the default variable name. Are there options to do this with MATLAB Coder?

採用された回答

MathWorks Support Team
MathWorks Support Team 2023 年 4 月 10 日
編集済み: MathWorks Support Team 2023 年 4 月 13 日
With Embedded Coder installed, you can:
1. Use Code Appearance to specify what characters prefix or suffix global and local variables. See the below for instructions on how this is done:
Run this command in MATLAB R2017b for documentation:
>> web(fullfile(docroot, 'ecoder/ug/customize-generated-identifiers.html'))
For the latest release documentation:
2. Consider Code Replacement, which is used to specify new name and structure to functions in the generated code. See:
Run this command in MATLAB R2017b for documentation:
>> web(fullfile(docroot, 'coder/code-replacement-mc.html'))
>> web(fullfile(docroot, 'coder/ug/what-is-code-replacement-mc.html'))
For the latest release documentation:
  1 件のコメント
Royi Avital
Royi Avital 2020 年 9 月 21 日
Is there a way to do something like in ecoder for the regular coder?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB Coder についてさらに検索

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by