User`s guide
%#function
Purpose Pragma to help MATLAB Compiler locate functions called through
feval, eval, or Handle G raphics® callback
Syntax %#function function1 [f unct ion2 ... functionN]
%#function object_co nstr uctor
Description The %#function pragma informs M ATLAB Compiler that the specified
function(s) will be called through an
feval, eval,orHandleGraphics
callback.
Use the
%#function pragma in standalone C and C++ applications
to inform MATLAB Compiler that the specified function(s) should
be included in the compilation, whether or not MATLAB C ompiler’s
dependency analysis detects the function(s). It is also possible to include
objects by specifying the object constructor.
Without this prag m a, MATLAB Compiler’s depende ncy analysis will
notbeabletolocateandcompileallM-filesusedinyourapplication.
This pragma adds the top-level function as well as all the subfunctions
inthefiletothecompilation.
Examples Example 1
function foo
%#function bar
feval('bar');
end %function foo
By implementing this example, MATLAB Compiler is notified that
function
bar will be included in the compilation and is called through
feval.
Example 2
function foo
%#function bar foobar
11-3