diff --git a/MatlabAPI/private/maskApi.mexa64 b/MatlabAPI/private/maskApi.mexa64 index 5066fec..ac4b456 100755 Binary files a/MatlabAPI/private/maskApi.mexa64 and b/MatlabAPI/private/maskApi.mexa64 differ diff --git a/MatlabAPI/private/maskApi.mexmaci64 b/MatlabAPI/private/maskApi.mexmaci64 index 1ce4b45..546c25d 100755 Binary files a/MatlabAPI/private/maskApi.mexmaci64 and b/MatlabAPI/private/maskApi.mexmaci64 differ diff --git a/MatlabAPI/private/maskApiMex.c b/MatlabAPI/private/maskApiMex.c index 097e929..f1f0e46 100644 --- a/MatlabAPI/private/maskApiMex.c +++ b/MatlabAPI/private/maskApiMex.c @@ -59,7 +59,7 @@ void mexFunction( int nl, mxArray *pl[], int nr, const mxArray *pr[] ) if(!strcmp(action,"encode")) { checkType(pr[0],mxUINT8_CLASS); byte *M=(byte*) mxGetData(pr[0]); - const mwSize *ds=mxGetDimensions(pr[0]); n=mxGetN(pr[0])/ds[0]; + const mwSize *ds=mxGetDimensions(pr[0]); n=mxGetN(pr[0])/ds[1]; rlesInit(&R,n); rleEncode(R,M,ds[0],ds[1],n); pl[0]=toMxArray(R,n); } else if(!strcmp(action,"decode")) {