Ken & Mike on the MATLAB Desktop

August 29th, 2007

I Came, I Saw, I Created my own Desktop Layout

When I watch customers use the Desktop, I often see that there is one part of it that gives them the most trouble: moving desktop components to organize the layout. Layout out components is easy to do once you know the trick. As an example, I’ll show you how to move the Workspace browser to a tabbed position with the Command History.

Dragging

From the default layout, I first grab the Workspace titlebar and drag it around. The important thing to remember about getting it to lock into the right place, is to NOT LET GO of it until you see the black lines indicate the correct position. For example, as I drag the Workspace browser, I see black lines that don’t line up with the position I want:

Incremental Search Box


And, I don’t want this position either! I’ll keep dragging to find the right spot:


Incremental Search Box


Now, I see the outline that matches the position I want, like this one:


Incremental Search Box


There are so many different positions that the window can drop into and these little black lines are your guide to moving the windows into the spots that you want.

Dragging

After you have spent a bit of time getting the layout just the way you like it, save the layout so you can easily get it back later. Go to the “Desktop” menu, “Save Layout…” menuitem. Enter a name for the layout and hit ok:

Incremental Search Box

After the layout has been saved, you can re-set it by going to the “Desktop menu”, “Desktop Layout” menuitem and choosing your saved layout.

Incremental Search Box

9 Responses to “I Came, I Saw, I Created my own Desktop Layout”

  1. Dan Kominsky replied on :

    Kristin,
    I have a question regarding the desktop layouts. Why can’t the deploytool remember its location in a desktop layout? Or, is there a way to make it do so? I would appreciate this being addressed at some point.

    Thanks,
    Dan

  2. jason replied on :

    Are the desktop layouts easily transferable between matlab versions or between computers? I use both 2006b and 2007a (because of some bugs) on a laptop (small models) and a desktop (larger, longer models). I’d love to be able to copy (rsync or unison) a single file between all four matlab installations.

  3. Peter replied on :

    Dan,

    I don’t know of any way to make the deploytool rembember its location in the current release (2007a) but have you checked out the 2007b prerelease…

  4. Peter replied on :

    Jason,

    There are some limitations but layout files can be shared between MATLAB versions. When you save a layout, say naming it “My Layout”, a file named “My LayoutMATLABLayout.xml” is written to the MATLAB prefdir. You can manually copy this file to the prefdir of another release. In fact when you install a new release these files are automatically carried forward. The limitation is that if you create a layout under 2007a which places components in the newly introduced minimized or maximized states then 2006b won’t know how to interpret the layout file.

  5. Peter P. replied on :

    Is there a possibility to open a predefined layout “My Layout” by the command line? I already tried to do it with the commands of
    “com.mathworks.mlservices.MatlabDesktopServices”, but I couldn’t find an appropriate function.
    Thank you very much for reply,
    Peter

  6. ghzhao replied on :

    Can I add some menuitems of my own?
    Can I add some new browsers?
    Can I control the interface of matlab freely?

  7. Ben replied on :

    Can I use a script to switch between Desktop Layouts, i.e., is it possible to do it without using the mouse?

  8. Mike replied on :

    Ben,

    No there is no supported way to do this right now.

  9. Yair Altman replied on :

    @Ben and Peter P. - saving and switching layouts can indeed be done programmatically. However, as Mike mentioned this is not supported and so might break in future Matlab releases, as it has indeed in the past.

    With this warning in mind, you are welcome to read the details here:
    http://undocumentedmatlab.com/blog/setting-the-matlab-desktop-layout-programmatically/

    Yair

Leave a Reply

Wrap code fragments inside <pre> tags, like this:

<pre class="code">
a = magic(3);
sum(a)
</pre>

If you have a "<" character in your code, either follow it with a space or replace it with "&lt;" (including the semicolon).


Ken & Mike work on the MATLAB Desktop team.
  • DP: Hi i have a problem with ezplot3, i want to plot more than i curve in the same graph but hold on command...
  • Ken: Hi Arsalan, Unfortunately there is no way to get the new Editor API in older versions of MATLAB. -Ken
  • Arsalan: Hi, I am very excited about the MATLAB API for editor because right now i am working on a project and i need...
  • Johannes: Since I started using matlab-emacs some days ago I never experienced Emacslink. But I experienced some...
  • Francisco J. Beron-Vera: Hi all, I have recently learned about ViEmu (http://www.vimemu.c om) which, for Vi/Vim...
  • OysterEngineer: When I first learned of the Publish feature in MatLab, I thought it might be useful to help to...
  • Ken: Hi Herve, I’m not quite sure what you mean by “stand-alone&# 8221; mode? -Ken
  • Herve: I wonder when the publish fonction will be supported in standalone mode.
  • Mike: Ravi, What you described should work as far I understand it. Please follow up with technical support. With a...
  • Mike: @Daniel, Thanks for that note.

These postings are the author's and don't necessarily represent the opinions of The MathWorks.