`mxGetPr` should only be used with double's. Use `mxGetData` here instead.