I've written a Matlab script which it calls several functions within itself, and now I need to run it from VB.net. The Matlab script has no input from VB, but it has an image output and a number from the workspace. After watching this youtube video, and reading this page, I wrote the following code within VB.net: (In this code main.m is the name of Matlab script)
Public Class Form1
Dim MatLab As Object
Dim Result As String
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
MatLab = CreateObject("Matlab.Application")
Result = MatLab.Execute("cd D:\\main.m\")
End Sub
End Class
Also, I tried to use these pages (link 1, link 2), but they returned errors.