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

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 354
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 90
Using Wrapper Files
y=0;
You can compile sa mple.m in to a POSIX main applica t io n . If y o u call sample
from MATLAB, you get
sample hello world
ans =
hello
ans =
world
ans =
0
If you compile sample.m and call it from the DOS shell, you get
C:\> sample hello world
ans =
hello
ans =
world
C:\>
The difference between the MATLAB and DOS/UNIX environments is the
handling of the return value. In MATLAB, the return value is handled by
printing its value; in the DOS/UNIX shell, the return value is handled as
the return status code. Wh en you c ompile a function into a POSIX main
application, the return status is set to 0 if the compiled M -file is executed
without errors and is nonzero if there are errors.
C Library Wrapper
The -l option, or its equivalent -W lib:libname, produces a C library
wrapper file. This option produces a shared library from an arbitrary set of
M-files. The generate d header file co ntains a C function declaratio n for each
5-11
Vue de la page 90
1 2 ... 86 87 88 89 90 91 92 93 94 95 96 ... 353 354

Commentaires sur ces manuels

Pas de commentaire