MATLAB: MATLAB Coder: Option “generate one file for each MATLAB file”

matlab coder

Hello, I want to produce C/C++ standalone Code with MATLAB Coder. Although i took the option "generate one file for each MATLAB file" some MATLAB files are translated together in one C/C++ file. Is there another option to take influence on that? Kind regards Andreas

Best Answer

Possible solutions:
  1. Provide both functions as an entry-point function
  2. Use the coder.inline flag to control whether a function gets inlined (see documentation below)
https://www.mathworks.com/help/simulink/slref/coder.inline.html