| External Interfaces/API, MATLAB® Version 7.3 (R2006b) Release Notes | ![]() |
Version 7.3 (R2006b) defines two new types for API arguments and return values. These are
mwSize — represents size values, such as array dimensions and number of elements.
mwIndex — represents index values, such as indices into arrays.
Using these types in array declarations replaces more specific type declarations such as int or INTEGER*4. In general, using these types consistently in your C or Fortran source files can insulate your code from changes in the API implementation that might take place between different versions of MATLAB®.
The mwSize and mwIndex types are required when working with functions that access sparse arrays on a 64-bit system. This is described in the release note on Sparse Arrays on 64-bit Systems, below.
Note In Fortran, mwSize and mwIndex are implemented as preprocessor macros. To use these types in Fortran code, add the declaration #include "fintrf.h" in your source file and build your MEX-files using the Fortran preprocessor. |
The internal storage of sparse arrays on 64-bit systems has changed in the R2006b release. Due to this change, you will need to
Change declaration statements in your source code so that you use the new types mwSize and mwIndex in place of specific type declarations such as int or INTEGER*4. This is described in the section New Types for Declaring Size and Index Values, above.
Recompile all MEX-files that interact with sparse arrays using the new -largeArrayDims switch. For more information about the -largeArrayDims switch, see the section New MEX Switch, below.
See the section on Compatibility Considerations to find out if you will need to make any modifications to your existing MEX code to accommodate these changes.
You will need to recompile any MEX-files that use the following sparse functions on a 64-bit system:
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 filenameAlso, 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. |
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.
In Version 7.3 (R2006b), you can save MAT-files in a format based on HDF5. Unlike earlier MAT-file formats, the HDF5-based format is capable of saving variables that occupy more than 2 GB of storage, including large arrays created on 64-bit systems.
To save a MAT-file in the HDF5-based format, use the -v7.3 option to the MATLAB save function or the "w7.3" mode argument to the C or Fortran matOpen function. The default MAT-file format is the same as that in Version 7.2 (R2006a).
Earlier versions of MATLAB cannot read MAT-files written in the HDF5-based format.
MAT-files written with MATLAB Version 7.3 (R2006b) on a 64-bit system can be read back into MATLAB 7.3 on a 32-bit system, provided that none of the values stored in the MAT-file require more than 32 bits to store.
The -V5 option to mex is not supported in this and future versions of MATLAB.
You will no longer be able to build a MEX-file that is compatible with MATLAB Version 5.
In MATLAB Version 7.3, the Microsoft® Windows® script mex.bat is located in the directory $MATLAB\bin.
You may need to change any scripts or environment variables that relied on the previous location of mex.bat.
Compaq® Visual Fortran version 6.1 is supported in Version 7.3 (R2006b) but will not be supported in a future version of MATLAB.
To ensure continued support for building your Fortran programs, consider upgrading to another supported compiler. For an up-to-date list of supported compilers, see Technical Note 1601: http://www.mathworks.com/support/tech-notes/1600/1601.html.
Attempting to insert a COM server into a MATLAB figure can result in unpredictable behaviors. To prevent this condition, the actxcontrol command now checks the ProgID by looking at the registry's HKR/CLSID/Control keyword and throws an error if the ProgID does not belong to a Microsoft® ActiveX® control.
Before the validation check was added, some server ProgIDs worked with actxcontrol , probably because there are cases where Microsoft software points the server GUID to a control GUID underneath. An example of a ProgID that might not work with actxcontrol is the Windows Media® Player server ProgID Mediaplayer.mediaplayer.1. Therefore, depending on how Microsoft software registers the control, the following command might now return an error:
h = actxcontrol('Mediaplayer.mediaplayer.1'); % Returns an errorThe correct ProgID to use for Mediaplayer is the ActiveX® control ProgID:
h = actxcontrol('WMPlayer.OCX.7'); % Use control ProgIDNote that methods and properties to open and play files are different when using the control ProgID.
You can disable the validation check with the following command:
feature('COM_ActxProgidCheck',0)Or reenable it with:
feature('COM_ActxProgidCheck',1)By default, ProgID checking is on.
![]() | Creating Graphical User Interfaces (GUIs), MATLAB Version 7.3 (R2006b) | Version 7.2 (R2006a) MATLAB® Software | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |