| How to Pass a Single-Dimension SAFEARRAY For information about passing arguments as one-dimensional arrays to a COM object, see the Technical Support solution 1-SKYP9 at http://www.mathworks.com/support/solutions/data/1-SKYP9.html. Passing SAFEARRAY By Reference For information about passing arguments by reference to a COM object, see the Technical Support solution 1-SKYPY at http://www.mathworks.com/support/solutions/data/1-SKYPY.html. Reading SAFEARRAY from a COM Object in MATLAB® Applications This section explains how MATLAB reads SAFEARRAY data from a COM object. MATLAB reads a one-dimensional SAFEARRAY with n elements from a COM object as a 1 -by-n matrix. For example, using methods from the MATLAB sample control mwsamp,type: h=actxcontrol('mwsamp.mwsampctrl.1') a = h.GetI4Vector MATLAB displays: a= 12 3 MATLAB reads a two-dimensional SAFEARRAY with n elements as a 2-by-n matrix. For example: a = h.GetR8Array MATLAB displays: a= 12 3 4 5 6 |