I am passing an integer array of uint8 type from MATLAB to a MEX-function. How do I read these values? I tried using:
int *n;
n = (int * ) mxGetData(prhs[0]);
but the values come out as junk. I also tried
double *n;
n= mxGetPr(prhs[0]);
and in this case junk values also appear.
What is the solution to this?
Basically I want to read the integer value in the MEX-function but mxGetPr
returns double type.