| MATLAB® Compiler™ | ![]() |
Pragma to help MATLAB® Compiler™ locate functions called through feval, eval, or Handle Graphics® callback
%#function function1 [function2 ... functionN]
%#function object_constructor
The %#function pragma informs the MATLAB Compiler product that the specified function(s) will be called through an feval, eval, or Handle Graphics® callback.
Use the %#function pragma in standalone C and C++ applications to inform the MATLAB Compiler product that the specified function(s) should be included in the compilation, whether or not the MATLAB Compiler product's dependency analysis detects the function(s). It is also possible to include objects by specifying the object constructor.
Without this pragma, the product's dependency analysis will not be able to locate and compile all M-files used in your application. This pragma adds the top-level function as well as all the subfunctions in the file to the compilation.
function foo
%#function bar
feval('bar');
end %function foo
By implementing this example, the MATLAB Compiler 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.
![]() | %#external | builder2prj | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |