Using the C++ Math Library    

GetData( )

The most basic of the functions is GetData(), which returns a pointer to the array data structure. This pointer is of type mxArray*. The array structure is an opaque data type, one in which the field names are unknown to the user. Access functions allow you to read and write the fields of the structure.

For example, to retrieve a pointer to the C++ array of double precision floating point numbers stored in an mxArray *, call mxGetPr() (to retrieve the real part of the array) or mxGetPi() (to retrieve the complex part). You can combine these calls with calls to GetData():

For more details on the mxArray type, see the MATLAB Application Program Interface Guide or the header file <matlab>/extern/include/matrix.h. Accessing Online Reference Documentation describes how to access the Help Desk.


 Extracting Data from an mwArray SetData( )