Main Content

La traduction de cette page n'est pas à jour. Cliquez ici pour voir la dernière version en anglais.

Créer ou supprimer un tableau Fortran

Créer un tableau d’un type spécifié, allouer et libérer de la mémoire

Utilisez les fonctions mxCreate* pour créer des tableaux MATLAB®. Utilisez les fonctions mxCalloc, mxMalloc et mxRealloc pour allouer de la mémoire dynamique.

Vous allouez de la mémoire chaque fois que vous utilisez une fonction mxCreate* ou que vous appelez mxCalloc et les fonctions associées. Utilisez mxDestroyArray pour libérer la mémoire allouée par les fonctions mxCreate*. Utilisez mxFree pour libérer la mémoire allouée par mxCalloc et les fonctions associées.

Fonctions Fortran

développer tout

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-D 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