I am writing a FORTRAN MEX file in which I am using the MEX API function MXCOPYPTRTOINTEGER4 as shown in the line of code below:
call mxCopyPtrToInteger4( mxGetDimensions( PRHS(2) ), $ DIMS, NDIMW )
where DIMS is INTEGER*4 and NDIMW is MWSIZE. This works fine on a 32-bit MATLAB.
However, when I recompile and execute this MEX file on 64-bit MATLAB, this code snippet gives me erroneous results. It does not provide the correct dimensions of a 2-D cell array or a 3-D matrix.
Best Answer