Pragma to help MATLAB Compiler SDK locate functions
called through feval
, eval
,
or graphics callback
%#function
function1
[function2
... functionN
]
%#function
object_constructor
The %#function
pragma informs the compiler
that the specified function(s) will be called through an feval
, eval
,
or graphics callback.
Without this pragma, the product's dependency analysis will not be able to locate and compile all MATLAB® files used in your application. This pragma adds the top-level function as well as all the local functions in the file to the compilation.
function foo %#function bar feval('bar'); end %function foo
By implementing this example, the MATLAB Compiler SDK™ product
is notified that function bar
will be included
in the compilation and is called through feval
.
function foo %#function bar foobar feval('bar'); feval('foobar'); end %function foo
In this example, multiple functions (bar
and foobar
)
are included in the compilation and are called through feval
.