mxCreateNumericArray (Fortran)
N-D numeric array
Fortran Syntax
#include "fintrf.h" mwPointer mxCreateNumericArray(ndim, dims, classid, ComplexFlag) mwSize ndim mwSize dims(ndim) integer*4 classid, ComplexFlag
Description
Use mxCreateNumericArray
to create an N-dimensional
mxArray
.
mxCreateNumericArray
differs from mxCreateDoubleMatrix
as follows:
All data elements in
mxCreateDoubleMatrix
are double-precision, floating-point numbers. The data elements inmxCreateNumericArray
can be any numerical type, including different integer precisions.mxCreateDoubleMatrix
creates two-dimensional arrays only.mxCreateNumericArray
can create arrays of two or more dimensions.
MATLAB® automatically removes any trailing singleton dimensions specified in the
dims
argument. For example, if ndim
equals
5
and dims
equals [4 1 7 1 1]
, then
the resulting array has the dimensions
4
-by-1
-by-7
.
This table shows the Fortran types that are equivalent to MATLAB classes.
MATLAB Class Name | Fortran Type |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
Call mxDestroyArray
when you finish using the
mxArray
. The mxDestroyArray
function
deallocates the mxArray
and its associated real and imaginary
elements.
Input Arguments
Output Arguments
Version History
Introduced before R2006a