Skip to Main Content Skip to Search
File Exchange
MATLAB Newsgroup
Link Exchange
  Blogs  
 Contest 
MathWorks.com

Loren on the Art of MATLAB

October 11th, 2006

My Working MATLAB Desktop Layout

A customer asked me recently to show him my preferred MATLAB desktop arrangement so I thought I would show and discuss my current set up. Here is some documentation about the desktop with more features than I mention here. Check out shortcuts for a feature I use often.

Contents

Components That I Dock

Here's a picture of my desktop, compressed so you can still read the names of the components that I generally keep open.

As you can see, I keep quite a few components open and docked in the desktop. These components are viewers for:

  • Command Window
  • Workspace
  • Command History
  • Current Directory
  • Help
  • Editor

Why these components? Well, I'm usually looking at, modifying, writing, and running code. I find the Workspace useful for quickly seeing array sizes (especially when vectors are involved). After playing around in the Command Window for a while, I gather some statements from the Command History as the first draft of an M-file. I am always using Help to find out details of syntax.

Additional Component I Use in the Desktop

  • File Comparisons

I use the File Comparisons when I am making a sequence of changes (saving intermediate versions to new files). I also use comparisons to look at code that might produce the same answers but run with very different timings. Of course, if that's so, I then move on to the Profiler (see the next section).

Other Components I Use Frequently

I have a few other components that I use all the time, but not generally docked with the desktop. They are:

  • Figures
  • Web Browser
  • Profiler

I find it helpful to get a picture of my data rather than just looking at the numbers. The Web Browser shows my current document published. And when I am checking into a performance curiosity, I use the Profiler. I find it generally convenient to have these windows outside the desktop, often so I can control their sizes and view most of more windows simultaneously.

Customized Configurations

Did you know that you can also customize and save particular component arrangements? I do this for cases in which I want less window clutter, and perhaps to emphasize a particular point in a discussion. In one example, I sometimes dock figure windows. When I run MATLAB, I can select different customized desktop arrangements from the desktop menu. I'd love to hear from you about the components and layouts you find most productive for your own work.


Published with MATLAB® 7.3

6 Responses to “My Working MATLAB Desktop Layout”

  1. Siamak replied on :

    I use two monitors and most of the times I have my editor on one monitor and the command window, workspace and the help window on the other monitor. And I don’t use tabbed layout it just makes me confused

  2. Dan K replied on :

    I have historically prefered to use docked figures, but I’ve had a real problem with it in R2006b. Many of the built in toolboxes don’t allow for windows being launched in the docked method. (Yes, it has been brought to tech support’s attention), but otherwise I really like the tabbed features. The only other item which I’m trying to figure out is why matlab is trying to do processing every time the mouse moves over a line… but that’s for a different venue.

  3. Matt replied on :

    I just upgraded to the latest version of MatLab. Is there a config file for my custom desktop layout that I can move from my old version of Matlab (R14) to the new (R2006b)?

  4. Loren replied on :

    Matt-

    Your preferences from your earlier MATLAB installation should get copied the first time after you install the new version. That definitely happened for me.

    You may want to contact support if it didn’t happen for you.

    In the meantime, you may alsoe execute prefdir in both your current MATLAB and your older one. From your older release, copy any of the files corresponding to your saved layouts (these files will be some of the ones ending in .xml). You may be overwriting existing versions in your new release (be careful to copy anything in your new release first somewhere safe, just in case).

    –Loren

  5. Alex replied on :

    HELLO!

    How I can save desktop layout
    in my v6.5.0 R13 MatLab version?

    Looks like v6 doesnt support
    layout saving

  6. Loren replied on :

    Alex-

    Look in the R13 doc here for saving your layout:

    http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_env/f3-12599.html#f3-56361

    From the documentation:

    Saving Your Own Desktop Layouts

    You can save a desktop layout and use it again at a later time. Select Desktop > Save > Layout to save the current layout. Assign a name to the layout in the resulting dialog box and click OK. To reuse the layout, select Desktop > Desktop Layout and then select the layout name.

    To rename or delete a saved layout, select Desktop > Organize Layouts. In the resulting dialog box, select a layout, click the Rename or Delete button, and click Close. When renaming, type the new name over the existing name.

    –Loren

Leave a Reply


Loren Shure works on design of the MATLAB language at The MathWorks. She writes here about once a week on MATLAB programming and related topics.

  • J.B. Brown: Ah, and I am at fault for simply testing collinearity with the origin in the example above.
  • J.B. Brown: Indeed, > collinear( [0 3],[0 8],[0 -1e21+2e-15] ) ans = 1 > collinear( [0 3],[0 8],[0 -1e22+2e-15]...
  • OkinawaDolphin: Loren, thank you for telling me where to download timeit. Here are the two functions I just tested...
  • Loren: JB- It looks to me like Ilya’s solution and therefore yours are equivalent to the determinant. As Tim...
  • Loren: OkinawaDolphin, timeit can be downloaded from the File Exchange. Steve Eddins is the author. It does not ship...
  • OkinawaDolphin: It seems that neither R2007a nor R2007b have the function timeit, but I investigated computation time...
  • J.B. Brown: It would appear to me that Ilya Rozenfeld’s solution would be the cleanest. Just to help those who...
  • Loren: Markus- Congratulations on winning! And a nice illustration of how the size matters. Small enough, and the...
  • Markus: Hi Loren, which version is fastest also depends very much on the matrix dimensions. Look at my test function:...
  • Duncan: OkinawaDolphin, Regarding why your third example is slower than your second example, the result is in fact...

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

Related Topics