Compilation Directive %#codegen
%#codegen directive (or pragma) to
your function after the function signature to indicate that you intend
to generate code for the MATLAB® algorithm. Adding this directive
instructs the MATLAB Code Analyzer to help you diagnose and fix
violations that would result in errors during code generation.
function y = my_fcn(x) %#codegen ....
%#codegen directive is not necessary
for MATLAB Function blocks. Code inside a MATLAB Function block is
always intended for code generation.
%#codegen directive, or the absence of it,
does not change the error checking behavior.