If you use Matlab from another program on Windows, you can start it using Matlab COM Automation Server . The ActiveX control has a Visible property that allows you to make the command line window invisible, but it looks like it leaves visible graphics.
Here is an example of how to do this using another Matlab as a controller.
ml = actxserver('Matlab.Application'); ml.Visible = false; ml.Execute('surf(peaks)');
Or in VBScript.
Set ml = CreateObject("Matlab.Application") ml.Visible = false ml.Execute("surf(peaks)") ml.Execute("pause(4)")
This interaction mode may be more than what you want in any case, depending on how your workflow is structured, because it will allow you to start the Matlab process once and make a lot of mailing requests on it, saving startup costs and letting you have multiple graphs visible at once.
If you still want to call it from the command line, just run it using the .vbs shell script with the above VBScript code, but call run('...\mfile.m') instead of surf(peaks) . Your mfile.m will need some GUI logic that blocks it until the user dodges the graph, replacing the pause call so that it does not disappear before they look at it.
source share