How do I use the GetFullMatrix method to get a dynamic MATLAB matrix into Visual Basic?
From the examples in the MATLAB External Interfaces manual related to using MATLAB as an Active X Automation Server, it appears that the VB Automation Client must know the dimensions of a matrix in the MATLAB workspace prior to accessing it with the 'GetFullMatrix' method.
In the examples in the manual, the VB code uses fixed array dimensions to access MATLAB matrices. If the dimensions of a MATLAB matrix change dynamically, then the VB arrays required a Redim( , ) statement prior to the getfullmatrix call in order to prevent any errors. I also tried to use Variant data types for the VB arrays, but received type mismatch errors in getfullmatrix call. Is there any way of declaring array types in VB that can access a MATLAB matrix with unknown dimension?
Best Answer