MATLAB: How to customize generated code with MATLAB Coder R2017b

appearancecodecodercustomizationmatlab coderreplacement

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?

Best Answer

With Embedded Coder installed, you can:
1. Use Code Appearance to specify what characters prefix or suffix global and local variables. See the documentation page below for instructions on how this is done:
2. Consider Code Replacement, which is used to specify new name and structure to functions in the generated code. See: