MATLAB: Which command is for making desktop layout in default form but matlab window be maximize (full screen)

commanddefaultdesktopfull screenlayoutMATLABwindow

which command is for making desktop layout in default form but matlab window be maximize (full screen)
in matlab: 'Desktop'>>desktop layout>>default
but i need run this from command window and also after that window of matlab be maximized

Best Answer

desktop = com.mathworks.mde.desk.MLDesktop.getInstance;
desktop.restoreLayout('Default');
pause(0.1);
desktop.getMainFrame.setMaximized(1);
Some further commands to influence the command window: FEX: CmdWinTool