7
extern N1<double> callsquare(N1<double> n1);
10
void mexFunction(int nlhs, Matrix** plhs, int nrhs, Matrix** prhs) {
12
mexErrMsgTxt("Need at least one argument");
13
if (mxGetM(prhs[0]) == 0)
14
mexErrMsgTxt("First argument must have at least one entry");
15
double* m = mxGetPr(prhs[0]);
17
N1<double> ans = callsquare(N1<double>(*m));
18
Matrix* result = mxCreateFull(1,1,REAL);
19
*mxGetPr(result) = ans.data();