I am using GetFullMatrix function in my VBA code to import a matrix from MATLAB to Excel. Here is my code
Dim MatLab As Object Dim Result As String Dim A_real(4,3) As Double Dim A_imaginary(4,3) As Double Set MatLab = CreateObject("matlab.application") Result = MatLab.Execute("M=rand(4,3)") Call MatLab.GetFullMatrix("M", "base", A_real, A_imaginary) MatLab.Quit
However, I get the following runtime error in Excel
RUN-TIME ERROR '-2147352567 (80020009)' Exception occurred.
Best Answer