From: Matt Dunham on
"Yair Altman" <altmanyDEL(a)gmailDEL.comDEL> wrote in message <hvurmh$omi$1(a)fred.mathworks.com>...
> > I tried it hard to increase the window size until the menubar is out of the screen:
> > frame = com.mathworks.mde.desk.MLDesktop.getInstance.getMainFrame;
> > frame.setBounds(-4, -44, 1040, 900);
> [...]
> > Yair, we need your advice.
>
>
> To the rescue:
>
> jDesktopFrame = com.mathworks.mde.desk.MLDesktop.getInstance.getMainFrame;
> jDesktopMenu = jDesktopFrame.getRootPane.getMenuBar;
> jDesktopMenu.setVisible(0);
> jDesktopMenu.repaint;
>
> Yair Altman
> http://UndocumentedMatlab.com

Thanks Yair, except the menu reappears whenever you change the focus from the command window to the editor, or any other matlab window.
From: Yair Altman on
> > > I tried it hard to increase the window size until the menubar is out of the screen:
> >
> > jDesktopFrame = com.mathworks.mde.desk.MLDesktop.getInstance.getMainFrame;
> > jDesktopMenu = jDesktopFrame.getRootPane.getMenuBar;
> > jDesktopMenu.setVisible(0);
> > jDesktopMenu.repaint;
> >
>
> Thanks Yair, except the menu reappears whenever you change the focus from the command window to the editor, or any other matlab window.

It doesn't on my R2010a...
Anyway, you can always do this (or variants thereof):

hDesktopFrame = handle(jDesktopFrame,'CallbackProperties');
set(hDesktopFrame, 'WindowGainedFocusCallback', @(h,e) jDesktopMenu.setVisible(0));

Yair Altman
http://UndocumentedMatlab.com