MATLAB APPLICATION DEPLOYMENT - WEB EXAMPLE GUIDE Guide de l'utilisateur Page 175

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 274
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 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');
Vue de la page 174
1 2 ... 170 171 172 173 174 175 176 177 178 179 180 ... 273 274

Commentaires sur ces manuels

Pas de commentaire