MATLAB: Start an external program (.exe) inside a matlab window

app designerapplicationexternal program

I've been searching about this on this forum, but can't find a way to do it.
The situation is the following: I am creating an application using the app designer and I need an external program to be executed in it, so that it can be used in my matlab application. However, I am trying to make the program run inside a matlab pane or window, and not in a separate new window. Is this possible?
I have seen that this can be done in C # using System.Diagnostics.Process.Start, and this works in matlab, however I don't know how to embed this process within my matlab interface so that it does not run as a separate window
I leave a page where it is shown how to do what I am looking for in C #
I would appreciate if someone could help me achieve this in Matlab
Thank you very much!

Best Answer

  • External processes always run as a separate window. However for non-graphic processes, you can control the standard output and standard error output streams using System.Diagnostic.Process methods, and read from them at the MATLAB level and display them (or not) as you want.
    If the process deliberately starts its own window, there is nothing you can do to prevent it.