MATLAB APPLICATION DEPLOYMENT - WEB EXAMPLE GUIDE Guía de usuario Pagina 91

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 354
  • Tabla de contenidos
  • SOLUCIÓN DE PROBLEMAS
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 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
Vista de pagina 90
1 2 ... 86 87 88 89 90 91 92 93 94 95 96 ... 353 354

Comentarios a estos manuales

Sin comentarios