This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Create or Delete Fortran Array

Create array of specified type, allocate and free memory

Use the mxCreate* functions to create MATLAB® arrays. Use the mxCalloc, mxMalloc, and mxRealloc functions to allocate dynamic memory.

You allocate memory whenever you use an mxCreate* function or when you call the mxCalloc and associated functions. Use mxDestroyArray to free memory allocated by the mxCreate* functions. Use mxFree to free memory allocated by the mxCalloc and associated functions.

Fortran Functions

expand all

mxCreateDoubleMatrix2-D, double-precision, floating-point array
mxCreateDoubleScalarScalar, double-precision array initialized to specified value
mxCreateNumericMatrix2-D numeric matrix
mxCreateNumericArrayN-D numeric array
mxMakeArrayRealConvert complex mxArray to real, preserving real data
mxMakeArrayComplexConvert real mxArray to complex, preserving real data
mxCreateString1-N array initialized to specified string
mxCreateCharMatrixFromStrings2-D mxChar array initialized to specified value
mxCreateCharArrayN-D mxChar array
mxCreateSparse2-D sparse array
mxCreateStructMatrix2-D structure array
mxCreateStructArrayN-D structure array
mxCreateCellMatrix2-D cell array
mxCreateCellArrayN-D cell array
mxDestroyArrayFree dynamic memory allocated by MXCREATE* functions
mxDuplicateArrayMake deep copy of array
mxCallocAllocate dynamic memory for array, initialized to 0, using MATLAB memory manager
mxMallocAllocate uninitialized dynamic memory using MATLAB memory manager
mxReallocReallocate dynamic memory using MATLAB memory manager
mxFreeFree dynamic memory allocated by mxCalloc, mxMalloc, mxRealloc, mxArrayToString, or mxArrayToUTF8String functions