
Use mxCreateDoubleMatrix to create the two input matrices ( x and y). This C function header shows two input arguments (mxArray *x and mxArray *y) and two output arguments (the return value and mxArray **b).
How to compile standalone applications in matlab 2012 how to#
* Install a print handler to tell mlfPrintMatrix how to MultpkgInitialize() /* Call multpkg initialization */ Int main( ) /* Programmer written coded to call mlfMultarg */ĭouble x_pr = Static void PrintHandler( const char *text ) #include "multpkg.h"/* Include Compiler-generated header file */ The code in multargp.c calls mlfMultarg and then displays the two values that mlfMultarg returns. Multarg.m specifies two input parameters and returns two output parameters: multargp.c, which contains a C function named main.multarg.m, which contains a function named multarg.

Consider a stand-alone application whose source code consists of two files: This section illustrates an advanced example of how to write C code that calls a compiled M-file. Stand-Alone Applications (MATLAB Compiler) MATLAB Compiler
