clibArray
Description
cArray = clibArray(
creates a clib array, a MATLAB® object representing a C++ object of elementTypeName
,dimensions
)elementTypeName
with
C++ dimensions specified as [x1,...,xN]
. If the C++ object is a primitive
type, then cArray
contains zero values. If the C++ object is a
class-type, then MATLAB initializes cArray
using the default
constructor.
A MATLAB clib array can be defined only when the corresponding C++ native array or
std::vector
is used by supported C++ constructs — function arguments,
function returns, and data members.
Alternatively, if the element type is a fundamental type, a user-defined class with a
default constructor, or a standard string type, call the clib.array
constructor. For example, for elementTypeName
defined in
libname
:
cArray = clib.array.libname
.elementTypeName
(dimensions
)
The memory of cArray
is owned by MATLAB. To release the memory, call clibRelease
.
To convert a MATLAB array to a C++ array, call clibConvertArray
.
Examples
Input Arguments
Version History
Introduced in R2020a