User`s guide

B Data Conversion
B-6
char
A 1-by-1 char matrix
converts to a
VARIANT of
type
VT_BSTR with string
length = 1.
A 1-by-L
char matrix
is assumed to
represent a string of
length Lin 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 array is of
length 1 and
corresponds to each
character in the
original matrix.
Arrays of strings
are not supported
as
char matrices.
To pass an array of
strings, use a cell
array of 1-by-L
char matrices.
sparse VT_DISPAATCH VT_DISPATCH
A MATLAB sparse
array is converted
to an
MWSparse
object. (See Class
MWSparse on
page D-25.) This
object is passed as a
VT_DISPATCH type.
Table B-2: MATLAB to COM VARIANT Conversion Rules (Continued)
MATLAB Data Type VARIANT type for Scalar
Data
VARIANT type for
Array Data
Comments