Save MATLAB function graph through Visual Studio?


Hello, is there any way to save a graphic that is in MATLAB, save it in a specific path through Visual Studio?

Try doing it if:

 PictureBox1.Load(Matlab.Execute("ezplot('x^2',[-2,2]) "))

But the MATLAB window skips but it is shown in the PICTUREBOX.

Help me please.

asked by Javier 03.05.2016 в 16:33

1 answer


When you use the Execute function with Matlab.Execute this opens an instance of Matlab and passes as a parameter the text string in parentheses, but Matlab is the one who decides how to execute the script and you do not have control of that context from your application, It works like a web hyperlink.

As an alternative: You could write a more complex function in matlab that saves the result in a file and then try to read the file from your application.

answered by 11.06.2016 в 16:51