In MATLAB you should be able to pass the following to ActiveX controls: scalars, vectors, and matrices of doubles or strings; ActiveX objects; and cell arrays. There is a limitation on cell arrays which are passable. They must have two or fewer dimensions and can contain only scalars or strings. The cell arrays are converted to ActiveX SAFEARRAYs before being passed to the control.
Also, note that one-dimensional arrays in MATLAB are passed as two-dimensional arrays to ActiveX servers.
To see how to pass cell arrays to a control or automation server, let's try it out with the MWSamp control which ships with MATLAB. First, instantiate the control with the MWSAMP command:
Then use INVOKE to pass the cell array:
invoke (h, 'SetBSTRArray', {'asdf',8})
You should see that the control returns a cell array back to MATLAB which contains the same contents which were passed. The SetBSTRArray method takes a SAFEARRAY of Variants and returns a copy as a SAFEARRAY. This SAFEARRAY is converted back into a cell array.
The MWSamp control contains other methods which allow you to pass it any of the data types which MATLAB supports for ActiveX. In MATLAB 5.2 you can type "invoke(h)" to see a full list of the control's methods.