MATLAB APPLICATION DEPLOYMENT - WEB EXAMPLE GUIDE Betriebsanweisung Seite 175

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 274
  • Inhaltsverzeichnis
  • FEHLERBEHEBUNG
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 174
Interfacing M-Code to C/C++ Code
5-49
callback that references the specified function. Without this pragma, the -h
option will not be able to locate and compile all M-files used in your application.
If you are using the
%#function pragma to define functions that are not
available in M-code, you must write a dummy M-function that identifies the
number of input and output parameters to the M-file function with the same
name used on the
%#function line. For example:
%#function myfunctionwritteninc
This implies that myfunctionwritteninc is an M-function that will be called
using
feval. The Compiler will look up this function to determine the correct
number of input and output variables.
Compiling MEX-Files
If the Compiler finds both a function M-file and a .mex file in the same
directory, it will assume that the
.mex file is the compiled version of the M-file.
In those cases, if the M-file version is not desired, use the
%#mex pragma to force
the Compiler to use the MEX-file. For example:
function y = gamma(x)
%#mex
error('gamma MEX-file is missing');
Seitenansicht 174
1 2 ... 170 171 172 173 174 175 176 177 178 179 180 ... 273 274

Kommentare zu diesen Handbüchern

Keine Kommentare