mxCreateNumericArray (C)
N-D numeric array
C Syntax
#include "matrix.h"
mxArray *mxCreateNumericArray(mwSize ndim, const mwSize *dims,
mxClassID classid, mxComplexity ComplexFlag);Description
Use mxCreateNumericArray to create an N-dimensional
mxArray. The data elements have the numeric data type specified by
classid.
mxCreateNumericArray differs from mxCreateDoubleMatrix as follows:
All data elements in
mxCreateDoubleMatrixare double-precision, floating-point numbers. The data elements inmxCreateNumericArraycan be any numerical type, including different integer precisions.mxCreateDoubleMatrixcreates two-dimensional arrays only.mxCreateNumericArraycan 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 C classid values that are equivalent to
MATLAB classes.
MATLAB Class Name | C |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
Examples
To open an example, type:
edit([fullfile(matlabroot,"extern","examples","refbook","filename")]);
where filename is:
To open an example, type:
edit([fullfile(matlabroot,"extern","examples","mx","filename")]);
where filename is:
Version History
Introduced before R2006a