User`s guide
B Data Conversion
B-12
Array Formatting Flags
MATLAB Excel Builder components have flags that control how array data is
formatted in both directions. Generally, you should develop client code that
matches the intended inputs and outputs of the MATLAB functions with the
corresponding methods on the compiled COM objects, in accordance with the
rules listed in Table B-2 and Table B-3. In some cases this is not possible, e.g.,
when existing MATLAB code is used in conjunction with a third-party product
like Excel.
<anything>|VT_BYREF
(varies) Pointers to any of the basic types are processed
according to the rules for what they point to. The
resulting MATLAB array contains a deep copy of
the values.
<anything>|VT_ARRAY
(varies) Multidimensional VARIANT arrays convert to
multidimensional MATLAB arrays, each element
converted according to the rules for the basic
types. Multidimensional
VARIANT arrays of type
VT_VARIANT|VT_ARRAY convert to
multidimensional cell arrays, each cell converted
according to the rules for that specific type.
Table B-3: COM VARIANT to MATLAB Conversion Rules (Continued)
VARIANT Type MATLAB Data
Type (scalar or
array data)
Comments