MATLAB Release Notes    

External Interfaces/API Features

Concatenation of Java Arrays

In MATLAB 6.1, you can concatenate arrays of Java objects that have unlike dimensions. The following example concatenates a 2-by-3 array of java.lang.Integer with a 4-by-3 array of the same class.

The vertical concatenation [A;B] is simple since both arrays have the same number of columns. The horizontal concatenation [A B] merges the two arrays into an irregularly shaped array having six columns in the first and second rows and three columns in the third and fourth rows.

New Fortran MX, MEX, MAT, and ENG Functions

The following functions have been added to the Fortran MX, MEX, MAT, and Engine external interface. Most of these functions already exist in the MATLAB C language API.

Table 2-1: New Fortran MX Functions  
mxAddField
mxCalcSingleSubscript
mxClassIDFromClassName
mxClearLogical
mxCopyComplex8ToPtr
mxCopyInteger1ToPtr
mxCopyInteger2ToPtr
mxCopyPtrToComplex8
mxCopyPtrToInteger1
mxCopyPtrToInteger2
mxCopyPtrToReal4
mxCopyReal4ToPtr
mxCreateCellArray
mxCreateCellMatrix
mxCreateCharArray
mxCreateCharMatrixFromStrings
mxCreateDoubleMatrix
mxCreateNumericArray
mxCreateNumericMatrix
mxCreateScalarDouble
mxCreateStructArray
mxCreateStructMatrix
mxDestroyArray
mxDuplicateArray
mxGetCell
mxGetClassID
mxGetClassName
mxGetData
mxGetDimensions
mxGetElementSize
mxGetEps
mxGetField
mxGetFieldByNumber
mxGetFieldNameByNumber
mxGetFieldNumber
mxGetImagData
mxGetInf
mxGetNaN
mxGetNumberOfDimensions
mxGetNumberOfElements
mxGetNumberOfFields
mxIsCell
mxIsChar
mxIsClass
mxIsEmpty
mxIsFinite
mxIsFromGlobalWS
mxIsInf
mxIsInt8
mxIsInt16
mxIsInt32
mxIsLogical
mxIsNaN
mxIsSingle
mxIsStruct
mxIsUint8
mxIsUint16
mxIsUint32
mxMalloc
mxRealloc
mxRemoveField
mxSetCell
mxSetData
mxSetDimensions
mxSetField
mxSetFieldByNumber
mxSetImagData
mxSetLogical


Table 2-2: New Fortran MEX Functions  
mexFunctionName
mexGetArray
mexGetArrayPtr
mexIsGlobal
mexIsLocked
mexLock
mexMakeArrayPersistant
mexMakeMemoryPersistant
mexPutArray
mexUnlock
mexWarnMsgTxt



Table 2-3: New Fortran MAT Functions  
matDeleteArray
matGetArray
matGetArrayHeader
matGetNextArray
matGetNextArrayHeader
matPutArray
matPutArrayAsGlobal



Table 2-4: New Fortran Engine Functions
engGetArray
engPutArray

Property Added to ActiveX and Engine Interfaces

For ActiveX automation server applications and MATLAB Engine applications running on Windows, you can control whether the application windows appear on the Windows desktop with a new property called Visible.

When Visible is set, the ActiveX application or engine server window is visible on the desktop, thus enabling user interaction with the server. This is the default. When Visible is cleared, the application or engine window is removed from the desktop.

ActiveX.   This example disables the visibility of an ActiveX automation server application by setting h.visible to 0. It checks the visibility setting in line 3 by examining h.visible.

MATLAB Engine.   For a MATLAB engine session, use the engSetVisible and engGetVisible functions that are new in MATLAB 6.1. Line 4, below, disables the visibility of the MATLAB engine window using engSetVisible with an argument of 0. Line 5 checks this setting with engGetVisible.

Serial I/O

The MATLAB serial port interface provides direct access to peripheral devices such as modems, printers, and scientific instruments that you connect to your computer's serial port. This interface is established through a serial port object, which you create with the serial function.

Freeing the Serial Port on Windows Platforms.   The serial port object uses the javax.comm package to communicate with the serial port. However, due to a memory leak in javax.comm, the serial port object is not released from memory. You can use the freeserial function to release the MATLAB hold on the serial port.

freeserial is necessary only on Windows platforms. You should use freeserial only if you need to connect to the serial port from another application after a serial port object has been connected to that port, and you do not want to exit MATLAB.

Events, Callbacks, and Function Handles.   Action properties and action functions are now referred to as callback properties and callback functions. This new terminology is reflected in new names for the associated properties and functions. The general rule for the name changes is to change "Action" to "Fcn" for properties, and "action" to "callback" for functions. For example, TimerAction has been renamed TimerFcn, and instraction has been renamed instrcallback.

Additionally, if you want to automatically pass the object and event information to the callback function, then you must specify the function as either a function handle or as a cell array. Note that you can also specify the callback function as a string. In this case, the callback is evaluated in the MATLAB workspace and no requirements are made on the function's input arguments.

Enhancements to Existing Properties.   


  OpenGL Renderer Feature -- Microsoft Windows Creating Graphical User Interfaces -- GUIDE