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/.