Matlab Command Prompt Window Minimizes

I am running a GUI in MATLAB. I want that whenever my GUI opens, should the MATLAB command window be minimized?

I tried with WindowAPI but it does not work. Please provide some suggestions on how to do this.

+3
source share
1 answer

You can do this using Matlab Java support, thereby manipulating the (undocumented) Java objects that make up the Matlab IDE. As far as I know, the command window is always embedded in the main Matlab desktop window, so here is the code to minimize this.

Get a link to a Java object that implements Matlab Desktop:

desktop = com.mathworks.mde.desk.MLDesktop.getInstance();

Get a link to a window (Java Frame) containing the Desktop:

mf = desktop.getMainFrame();

:

mf.setMinimized(true);

.

Matlab . http://undocumentedmatlab.com/.

+2

All Articles