User`s guide
B Data Conversion
MATLAB to COM VARIANT Conversion Rules (Continued)
MATLAB Data
Type
VARIANT Type for
Scalar Data
VARIANT Type for
Array Data Comments
char
A1-by-1char matrix
converts to a
VARIANT
of type VT_BSTR with
string length = 1.
A1-by-L
char matrix is
assumed to represent
astringoflengthLin
MATLAB. This case
converts to a
VARIANT
of type VT_BSTR with a
string length = L.
char
matrices of more than
one row, or of a higher
dimensionality convert
to a
VARIANT of type
VT_BSTR|VT_ARRAY.
Each string in the
converted a rray
is of length 1 and
corresponds to each
character i n the
original matrix.
Arrays of strings are
not supported as
char
matrices. To p ass an
array of strings, use
a cell array of 1-by-L
char matrices.
sparse VT_DISPAATCH VT_DISPATCH
AMATLABsparse
array is converted to
an
MWSparse object.
(See “Class MWSparse”
on page C-27.) This
object is passed as a
VT_DISPATCH type.
B-6