MATLAB APPLICATION DEPLOYMENT - WEB EXAMPLE GUIDE Guida Utente Pagina 97

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
Vedere la pagina 96
Using Pragmas
Using Pragmas
In this section...
“Using feval” on page 5-17
“Example: Using %#function” on page 5-17
Using feval
In standalone C and C++ modes, the pragma
%#function <function_n ame- list>
informs MATLAB Compiler that the specified function(s) should be included in
the compilation, whether or not the MATLAB Compiler dependency analysis
detects it. Without this pragma, the M ATLAB Co mpiler dependency analys is
willnotbeabletolocateandcompileallM-filesusedinyourapplication.
This pragma adds the top-level function as well as all the subfunctions in
thefiletothecompilation.
You cannot use th e
%#function pragma to refer to functions that are not
available in M-code.
Example: Using %#function
A good coding technique involves using % #fu nction in your code wherever
you use
feval statements. This example shows how to use this technique
to help MATLAB Compiler find th e appropria t e files during com pile tim e,
eliminating the need to include all the files on the command line.
function ret = mywindow(data,filterName)
%MYWINDOW Applies the window specified on the data.
%
% Get the length of th e data.
N= length(data);
% List all the possible windows.
% Note the list of fun ctions in the following function pragma is
% on a single line of code.
5-17
Vedere la pagina 96
1 2 ... 92 93 94 95 96 97 98 99 100 101 102 ... 353 354

Commenti su questo manuale

Nessun commento