MATLAB Coder: Option "generate one file for each MATLAB file"
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Andreas Schröffer
am 21 Aug. 2017
Kommentiert: Andreas Schröffer
am 30 Aug. 2017
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
6 Kommentare
Carl
am 28 Aug. 2017
Thanks for following up. To prevent MATLAB Coder from inlining a function, you can use the line "coder.inline('never')". For example:
function b = fcn2(a)
coder.inline('never')
b = a + 1;
end
This will prevent fcn2 from being inlined in fcn1.
Akzeptierte Antwort
Carl
am 28 Aug. 2017
Possible solutions:
- Provide both functions as an entry-point function
- 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
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu MATLAB Coder finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!