MATLAB: Is there another example of invoking MATLAB as an automation server using VB.NET

automationgetfullmatrixMATLABservervbvb.net

I have read the following solution:
I was wondering if there was another example of calling GetFullMatrix from VB.NET?

Best Answer

Below is another example of calling GetFullMatrix from VB.NET. This is without adding a MATLAB reference in the VB.NET project:
Dim MatLab As Object
Dim Result As String
Dim MReal(1, 3) As Double
Dim MImag(1, 3) As Double
Dim RealValue As Double
MatLab = CreateObject("matlab.application")
Result = MatLab.Execute("a = [1 2 3 4; 5 6 7 8;]")
Call MatLab.GetFullMatrix("a", "base", MReal, MImag)