Prev: genetic algorithm for functioon mimization using matllab
Next: Multiple overlayed contour plots not displaying in linux
From: Timothy on 29 Jan 2010 15:48 I have also had trouble finding a way to pass an array of data into MATLAB through an ActiveX interface. Any information anyone might have would be greatly appreciated. Thanks, Tim Haswell "Stephen Morris" <stephen(a)morris.net> wrote in message <gnms93$kij$1(a)fred.mathworks.com>... > An ActiveX control method returns three 32-bit integers: the second and third are C++ pointers to scalar integers containing the dimensions of an array, while the first is a C++ pointer to the array itself. > > How can I make MATLAB read the array, rather than simply returning a scalar? > > For completeness, the method is defined in C++ as: > > bool GetData(long* Array, long* ArrayWidth, long* ArrayHeight) > > ...and MATLAB sees it as > > [bool int32 int32 int32]=GetData(handle, int32, int32, int32). > > It reads the correct values for the array dimensions, but misinterprets the array as just another scalar. > > Many thanks, > Stephen Morris. |