fix mex functions

replace mxGetPr to mxGetData