comparison extra/mex/myfeval.c @ 0:6b33357c7561 octave-forge

Initial revision
author pkienzle
date Wed, 10 Oct 2001 19:54:49 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:6b33357c7561
1 #include "mex.h"
2
3 void mexFunction(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[])
4 {
5 char *str;
6 mexPrintf("Hello, World!\n");
7 mexPrintf("I have %d inputs and %d outputs\n", nrhs, nlhs);
8 if (nrhs < 1 || !mxIsString(prhs[0]))
9 mexErrMsgTxt("function name expected");
10 str = mxArrayToString (prhs[0]);
11 mexPrintf("I'm going to call the interpreter function %s\n", str);
12 mexCallMATLAB(nlhs, plhs, nrhs-1, prhs+1, str);
13 mxFree(str);
14 }