mxCreateUninitNumericArray (C)
Uninitialized N-D numeric array
C Syntax
#include "matrix.h" mxArray *mxCreateUninitNumericArray(size_t ndim, size_t *dims, mxClassID classid, mxComplexity ComplexFlag);
Arguments
ndimNumber of dimensions. If you specify a value for
ndimthat is less than 2,mxCreateUninitNumericArrayautomatically sets the number of dimensions to 2.dimsDimensions array. Each element in the dimensions array contains the size of the array in that dimension. For example, setting
dims[0]to 5 anddims[1]to 7 establishes a5-by-7mxArray. Usually, thedimsarray containsndimelements.classidIdentifier for the class of the array, which determines the way the numerical data is represented in memory. For example, specifying
mxINT16_CLASScauses each piece of numerical data in themxArrayto be represented as a 16-bit signed integer.ComplexFlagIf the
mxArrayyou are creating is to contain imaginary data, setComplexFlagtomxCOMPLEX. Otherwise, setComplexFlagtomxREAL.
Returns
Pointer to the created mxArray. If unsuccessful in a standalone
(non-MEX file) application, returns NULL. If unsuccessful in a MEX file,
the MEX file terminates and returns control to the MATLAB® prompt. The function is unsuccessful when there is not enough free heap space
to create the mxArray.
Description
Call mxCreateUninitNumericArray to create an N-dimensional
mxArray in which all data elements have the numeric data type specified
by classid. Data elements are not initialized.
mxCreateUninitNumericArray allocates dynamic memory to store the
created mxArray. Call mxDestroyArray to deallocate the
memory.
The following table shows the C classid values that are equivalent to
MATLAB classes.
|
MATLAB Class Name |
C |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Version History
Introduced in R2015a