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

  • 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 127
6 Standalone Applications
/* Initialize with a print handler to tell mlfPrintMatrix
* how to display its output.
*/
mclInitializeApplication(NULL,0);
libMultpkgInitializeWithHandlers( PrintHandler,PrintHandler);
/* Create input matrix "x" */
x = mxCreateDoubleMatrix(ROWS , COLS, mxCOMPL EX);
memcpy(mxGetPr(x), x_ pr, ROWS * COLS * sizeof(double));
memcpy(mxGetPi(x), x_ pi, ROWS * COLS * sizeof(double));
/* Create input matrix "y" */
y = mxCreateDoubleMatrix(ROWS , COLS, mxCOMPL EX);
memcpy(mxGetPr(y), y_ pr, ROWS * COLS * sizeof(double));
memcpy(mxGetPi(y), y_ pi, ROWS * COLS * sizeof(double));
/* Call the mlfMultarg function. */
mlfMultarg(2, &a, &b, x, y);
/* Display the entire contents of output matrix "a". */
mlfPrintmatrix(a);
/* Display the entire contents of output scalar "b" */
mlfPrintmatrix(b);
/* Deallocate temporary matrices. */
mxDestroyArray(a);
mxDestroyArray(b);
libMultpkgTerminate();
mclTerminateApplication();
return(0);
}
You can build this program into a standalone a pplication by entering this
command on a single line:
mcc -W lib:libMultpkg -T link:exe multarg printmatri x
multargp.c main_for_li b.c
6-20
Vue de la page 127
1 2 ... 123 124 125 126 127 128 129 130 131 132 133 ... 353 354

Commentaires sur ces manuels

Pas de commentaire