Hello everyone:
I am programming functions for Matlab and CUDA but I always get this error:
error: a value of type "mxArray **" cannot be assigned to an entity of type "char"
the code is this :
void mexFunction( int nlhs, mxArray *plhs[],int nrhs, const mxArray *prhs[])
{
char aux;
int i;
/* Examine input (right-hand-side) arguments. */
mexPrintf("\nThere are %d right-hand-side argument(s).", nrhs);
for (i=0; i<nrhs; i++) {
mexPrintf("\n\tInput Arg %i is of type:\t%s ",i,mxGetClassName(prhs[i]));
mexPrintf("\n\tInput Arg %i is of type:\t%s ",i,i);
}
/* Examine output (left-hand-side) arguments. */
mexPrintf("\n\nThere are %d left-hand-side argument(s).\n", nlhs);
if (nlhs > nrhs)
mexErrMsgTxt("Cannot specify more outputs than inputs.\n");
for (i=0; i<nlhs; i++) {
plhs[i]=mxCreateDoubleMatrix(1,1,mxREAL);
*mxGetPr(plhs[i])=mxGetNumberOfElements(prhs[i]);
}
aux = plhs[0];// <---- Here is the error
}