External Interfaces/API Reference    
mxCreateDoubleMatrix

Create an unpopulated two-dimensional, double-precision, floating-point mxArray

Fortran Syntax

Arguments

m
   The desired number of rows.

n
   The desired number of columns.

ComplexFlag
   If the data you plan to put into the mxArray has no imaginary component, specify 0. If the data has some imaginary components, specify 1.

Returns

A pointer to the created mxArray, if successful. If unsuccessful in a stand-alone (nonMEX-file) application, mxCreateDoubleMatrix returns 0. If unsuccessful in a MEX-file, the MEX-file terminates and control returns to the MATLAB prompt. mxCreateDoubleMatrix is unsuccessful when there is not enough free heap space to create the mxArray.

Description

Use mxCreateDoubleMatrix to create an m-by-n mxArray.

If you set ComplexFlag to 0, mxCreateDoubleMatrix allocates enough memory to hold m-by-n real elements and initializes each element to 0.0.

If you set ComplexFlag to 1, mxCreateDoubleMatrix allocates enough memory to hold m-by-n real elements and m-by-n imaginary elements. It initializes each real and imaginary element to 0.0.

Call mxDestroyArray when you finish using the mxArray. mxDestroyArray deallocates the mxArray and its associated real and complex elements.

See Also

mxCreateNumericArray


  mxCreateCharMatrixFromStrings mxCreateFull (Obsolete)