Using #defines within generated C++ code
5 views (last 30 days)
Is there a way to insert defined values (using #define in an included header file) into MATLAB Coder generated C++ code?
I want to create a function that breaks if a flag is set (exitFlag). In my included header I have
#define EXIT (exitFlag)
#define EXIT (false)
And I want to use in MATLAB something like the following
exit_entrypoint = false;
% <insert code that sets exit_entrypoint = to EXIT>
Let me know if this is possible or if there's a work around. Thanks.