00001 #include <stdio.h> 00002 #include "mex.h" 00003 #include "lib/pipo.h" 00004 00005 void mexFunction(nlhs, plhs, nrhs, prhs) 00006 int nlhs, nrhs; 00007 Matrix *plhs[]; Matrix *prhs[]; 00008 { 00009 Matrix *ptrA; 00010 double *A; 00011 int m,n; 00012 if (nrhs != 1) mexErrMsgTxt("This function requires 1 input!"); 00013 if (nlhs > 1) mexErrMsgTxt("This function requires at most 1 output !"); 00014 ptrA = prhs[0]; 00015 if (! mxIsNumeric(prhs[0])) mexErrMsgTxt("First argument must be numeric matrix."); 00016 m = mxGetM(ptrA);n = mxGetN(ptrA); 00017 A = mxGetPr(ptrA); 00018 A[0] = bar( (int) A[0]); 00019 plhs[0]=prhs[0]; 00020 } 00021
1.5.1