User`s guide
R2006b
21-36
Sparse API Functions Affected By This Change
You will need to recompile any MEX-files that use the following sparse functions on a 64-
bit system:
• mxGetIr
• mxGetJc
• mxSetIr
• mxSetJc
New MEX Switch
In order to build MEX-files that use any of the sparse array functions listed above, you
need to compile these files with the -largeArrayDims switch, as shown here:
mex -largeArrayDims filename
Also, any existing MEX-files that interact with sparse arrays in MATLAB Version 7.3
must be recompiled using the -largeArrayDims switch.
Note: The -largeArrayDims option is likely to become the default in a future version of
MATLAB.
Compatibility Considerations
If you are using any of the functions listed above, then you should be aware of the
following potential compatibility issues if your MEX code uses sparse arrays on a 64-bit
system:
• In release R2006b, you must rebuild all MEX-files that use sparse arrays using the
new -largeArrayDims switch.
• Before building your MEX-files, change your C or Fortran sources to use the mwSize
or mwIndex types introduced in this release. See the mxArray reference pages for the
types to use for each function.
• MEX-files that compiled properly in Version 7.2 (R2006a) and do not use sparse
arrays should build and execute correctly in Version 7.3 (R2006b) without changes.
• For more information on how the sparse API is affected, see the Sparse Arrays on
64-Bit Systems section in the MATLAB Mathematics release notes.