mxCreateUninitNumericMatrix (C)
Uninitialized 2-D numeric matrix
C Syntax
#include "matrix.h" mxArray *mxCreateUninitNumericMatrix(size_t m, size_t n, mxClassID classid, mxComplexity ComplexFlag);
Arguments
mNumber of rows
nNumber of columns
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 successful. 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.
Example
To open an example, type:
edit([fullfile(matlabroot,"extern","examples","mx","filename")]);
where filename is:
Description
Call mxCreateUninitNumericMatrix to create a 2-D
mxArray in which all data elements have the numeric data type specified
by classid. Data elements are not initialized.
mxCreateUninitNumericMatrix 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