Products & Services Solutions Academia Support User Community Company

Learn more about MATLAB   

External Interfaces/API, MATLAB Version 7.4 (R2007a)

New File Extensions for MEX-Files

MEX-Files in MATLAB for Apple Macintosh (Intel)

With the introduction of MATLAB for Macintosh (Intel), the MEX-files you build have the extension .mexmaci. The mexext command in MATLAB returns mexmaci for Macintosh (Intel).

Compatibility Considerations.   MEX-files built using MATLAB for Macintosh PowerPC®, which have.mexmac extensions, cannot be used in MATLAB for Macintosh (Intel).

MEX-Files in MATLAB for 64–bit Sun Solaris SPARC

With the introduction of MATLAB for 64–bit SolarisSPARC®, you can now build 64-bit MEX-files for the Solaris platform. These MEX-files have the extension .mexs64. The mexext command in MATLAB returns mexs64 for Solaris SPARC.

Compatibility Considerations.   MEX-files built using MATLAB for Solaris 32, which have.mexsol extensions, cannot be used in MATLAB for Solaris SPARC.

MEX-Files Built in MATLAB R11 or Earlier Must Be Rebuilt

In order to work with MATLAB V7.4 (R2007a), MEX-files compiled on Microsoft Windows (32–bit) platforms with MATLAB R11 or earlier will no longer load correctly and must be recompiled. These files can be compiled with MATLAB R12 or later.

Changes to Compiler Support

The set of compilers that MATLAB supports has changed in MATLAB Version 7.4 (R2007a). For an up-to-date list of supported compilers, see the Supported and Compatible Compilers Web page.

New Compiler Support

MATLAB V7.4 (R2007a) supports new compilers for building MEX-files.

Windows (64-bit) platform.  

Windows (32-bit) platform.  

Macintosh PowerPC and Macintosh (Intel) platforms.  

Linux[1] (64-bit) platform.  

Linux (32-bit) platform.  

SolarisSPARC (64-bit) platform.  

Fortran Compatibility Considerations

In R2007a we have added support for a new Fortran compiler g95 on the Linux and Macintosh platforms. This compiler implements the Fortran 95 language standard. It replaces previously supported Fortran compilers which implemented a previous language standard.

This may cause incompatibilities in your Fortran source code for MEX-files. Refer to the IBM XL Fortran V10.1 for Linux Language standards Web site http://publib.boulder.ibm.com/infocenter/lnxpcomp/v8v101
/index.jsp?topic=/com.ibm.xlf101l.doc/xlflr/languagestandards.htm
for information about incompatibilities between language standards.

Discontinued Compiler Support

The following compilers are no longer supported.

Linux (64–bit) platform.  

Linux (32–bit) platform.  

Macintosh PowerPC platform.  

Compatibility Considerations.   To ensure continued support for building your C/C++ programs, consider upgrading to another supported compiler. For an up-to-date list of supported compilers, see the Supported and Compatible Compilers Web page.

Compiler Support To Be Phased Out

The following compilers are supported in Version 7.4 (R2007a) but will not be supported in a future version of MATLAB.

Windows (32-bit) platform.  

Additional Linker Support for Intel Fortran

MATLAB V7.4 (R2007a) supports new linkers for building MEX-files with Intel Visual Fortran 9.0.

Windows (32-bit) platform.  

Windows (64-bit) platform.  

New COM Features

Programmatically Connect to Instances of a COM Automation Server

MATLAB can now programmatically connect to an instance of a COM Automation server using the new actxGetRunningServer function.

Improve the Custom Interface API

Changes to the actxserver function allow you to create a COM Automation server using a custom interface.

New COM Data Type Support

Additional COM data type support has been added. See Handling COM Data in MATLAB Software for a description of supported data types.

Enhanced Support for COM Interface Events

MATLAB users can take full advantage of event interfaces provided by COM Automation servers. This change is implemented in the events, eventlisteners, isevent, registerevent, unregisterevent, and unregisterallevents functions.

For an example of this feature, see Responding to Interface Events from an Automation Server.

Get the Status of a MATLAB Automation Server

Using the enableservice function you can learn the current state of a MATLAB Automation server. The function returns a logical value, where logical 1 (true) means MATLAB is an Automation server and logical 0 (false) means MATLAB is not an Automation server.

For example, if you type

enableservice('AutomationServer')

and MATLAB displays

ans =

     1

then MATLAB is currently an Automation server.

Changes to MATLAB Version-Specific ProgID

A programmatic identifier, or ProgID, is used to create a COM component. MATLAB's version-specific ProgID Matlab.Application.N.M now let's you specify both a major and minor version number.

For example, to specify MATLAB version 7.4, use the ProgID Matlab.Application.7.4.

Changes to Handling Microsoft ActiveX Methods

Beginning in MATLAB Version 7.4 (R2007a), an ActiveX® method with the same name as a class is treated as a constructor and cannot be called in the same way as an ordinary method.

In the following example:

myApp = actxserver('Excel.Application');
op = invoke(myApp.Workbooks, 'open', 'MyFile.xls');
Sheets = myApp.ActiveWorkBook.Sheets;
target_sheet = get(Sheets, 'item','Sheet1');
invoke(target_sheet, 'Activate');
Activesheet = myApp.Activesheet;
cellname = 'B2';
Range = Activesheet.cells.Range(cellname,cellname); 

the term Range is both a function on the MATLAB path and a constructor of the class Range. MATLAB tries to execute the function range, which generates the error:

??? Error using ==> range 
Too many input arguments. 

Error in ==> MyScript at 8 
Range = Activesheet.cells.Range(cellname,cellname);

To get the property value, use the get function.

For example:

Range = get(Activesheet.cells, 'Range', cellname, cellname);

[1] Linux is a registered trademark of Linus Torvalds.

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS