Why does MATLAB Coder produces empty C/C++ functions in MATLAB R2016a?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
MathWorks Support Team
am 20 Jul. 2016
Beantwortet: MathWorks Support Team
am 20 Jul. 2016
I am using MATLAB Coder to generate C++ code for a MATLAB function. The generated function that should contain my MATLAB algorithm is empty except for the comments that were present in the MATLAB function. How do I fix this?
Akzeptierte Antwort
MathWorks Support Team
am 20 Jul. 2016
This can happen if the function in question does not return anything and has no other side-effects like writing to the command line. In this case MATLAB Coder will optimize out the entire function. Returning the desired values from the MATLAB function will allow you to generate a non-empty C++ function.
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!