The MATLAB R2012b Desktop – Part 1: Introduction to the Toolstrip
Today I’d like to introduce a guest blogger, David Garrison, who is a MATLAB Product Manager here at MathWorks. Over the next few blog posts, David will take us through a series of posts describing some exciting features in the new R2012b MATLAB release:
- Part 1: Introduction to the Toolstrip
- Part 2: Customizing the R2012b MATLAB Desktop
- Part 3: MATLAB Apps
Here is Part 1 of the series.
Contents
Wow! Things really look different!
By now many of you have downloaded and installed MATLAB R2012b and have noticed some big changes to the appearance and organization of the MATLAB Desktop. For those who haven't installed R2012b yet, here is a picture of the new Desktop:
The most notable change is the introduction of the MATLAB Toolstrip. The Toolstrip reorganizes the Desktop functions found in the menus and toolbars from previous versions of MATLAB. In this first post, I will focus on the Toolstrip and introduce some important concepts.
The Toolstrip organizes MATLAB functionality in a series of tabs. Tabs are divided into sections that contain a series of related controls. The controls are buttons, drop-down menus and other user interface elements that you use to do things in MATLAB. For example, the picture below shows the Home tab with sections for operations on Files, Variables, Code and so forth. The File section has controls to do file related operations including creating scripts (New Script), opening files (Open), and comparing two files (Compare).
You may have also noticed the light blue bar in the upper right corner. That's called the Quick Access Toolbar. We'll talk more about that in Part 2 of this series.
Global Tabs
When you open R2012b for the first time, you will notice three tabs -- the Home tab, the Plots tab, and the Apps tab. These three tabs are always there no matter what you are doing in MATLAB. For that reason, they are called global tabs. The Home tab, shown above, is where you go to do general purpose operations like creating new files, importing data, managing your workspace, and setting your Desktop layout.
The Plots tab, shown below, is where you go to create MATLAB Plots. The Plots tab displays a gallery of plots available in MATLAB and any toolboxes that you have installed. To create a plot from the gallery, you select the variables in the workspace that you want to plot and then select the type of visualization you want to use for that data. The downward facing arrow on the far right brings down the full extent of the plot gallery with many more choices. The gallery is smart, only showing plots that are appropriate for the data that you've selected. This is an example of how the toolstrip uses context to direct you to the best options.
The last of the global tabs is the Apps tab, shown below. It is the place you go to run interactive MATLAB applications. Some of those applications come from MathWorks -- you get them automatically with Toolboxes that you have installed. The Apps tab presents a gallery of apps that you have installed. The downward facing arrow on the far right brings down the full extent of the apps gallery with many more choices. You simply click on the icon for your favorite app (e.g. Curve Fitting) and the app starts. The Apps tab is one of my personal favorites because it replaces the old "Start" menu. I find it much easier to find and use the apps that are most important in my work.
You probably noticed the three buttons on the far left of the tab. These are used to get more apps (from the File Exchange), install a new app, or package your own apps for distribution to others. We'll talk more about these three buttons in Part 3 of this series.
Contextual Tabs
As we've seen, global tabs are always present regardless of what you are doing in MATLAB. In addition to global tabs, the Toolstrip also has contexual tabs. Contextual tabs only appear when you're doing certain things in MATLAB. Let's look at the Editor as an example. When you edit a file, three new tabs appear -- the Editor tab, Publish tab, and View tab. If the Editor is docked in the Desktop, those tabs related to the Editor appear next to the global tabs as shown below.
I like to work with my Editor undocked so I have more room to view my file. The nice thing about contextual tabs is that they go along with the window to which they belong. So here's what the Editor looks like when it is undocked.
The Editor tab, shown above, contains all the functions you need when you're editing your file. All of those great capabilities of the Editor are there organized in a way to make them easier to find and use. The Publish tab, shown below, is another tab associated with the Editor. The Publish tab takes all the formatting controls you need to create beautiful MATLAB documents with publishing and puts them in a single place.
Publishing is a very useful feature in MATLAB that has been in the product for several years. In spite of that, MATLAB users don't always find it. When we were doing early testing of the Toolstrip, I was amazed at the number of people who discovered publishing for the first time. We were pleased to see how the Toolstrip makes features more prominent so users can find them.
The View tab is the last of the Editor contextual tabs. It is where you go to control the layout and appearance of files in the Editor. You'll also find contextual tabs in the Variable Editor. I'll let you explore those on your own.
Other Context Specific Behaviors
As we've seen thus far, the Toolstrip tries to give you what you need, when you need it without presenting every possible function all the time. We saw that behavior with the Plots gallery and with contexual tabs. Let me show you one more example of contextual behavior that I really like. You may have observed that the Editor tab has no controls for debugging. That's because you don't need those controls until you are actively debugging your code. Let's see what happens when you enter the debugger. Here is the way the Editor tab normally looks.
If I put a breakpoint in my file and click Run, the Editor tab changes to this:
That whole Run section has been replaced with a new Debug section. The Debug section contains all the controls I need to debug my code. I love this one because the Toolstrip gives me what I need only when I need it.
Minimizing the Toolstrip
OK, given all the cool stuff when seen thus far, there's one remaining question to answer. How do I hide the Toolstrip? Like many of you, I often work on a laptop with limited screen real estate. As much as I like the Toolstrip, there are times when I want to maximize the vertical space I have available for the Command Window or the Editor. If there are times when you don't want to see the Toolstrip, just minimize it. You can do that by right-clicking anywhere in the Toolstrip and selecting "Minimize Toolstrip" or by double-clicking on any of the tabs. When the toolstrip is minimized it looks like this:
In this state, the toolstrip is stil there. Clicking on a tab will temporarily restore it so you can still get to important functions. You can restore the Toolstrip by right-clicking anywhere on the Toolstrip and selecting "Restore Toolstrip" or by double-clicking on any of the tabs.
Have you discovered any new MATLAB functionality?
One of the objectives of the Toolstrip is to make important MATLAB functionality easier to find and use. Have you tried out the Toolstrip? Have you discovered any new capabilities that you didn't previously know about? I'd love to hear your thoughts here.
Next up -- Part 2: Customizing the R2012b MATLAB Desktop
Well, that's all for now. Try out the new Desktop and become familar with the tabs and the contextual behavior of the Toolstrip. Next time, we'll talk about ways to customize the R2012b Desktop including using the Quick Access Toolbar and creating and managing shortcuts.
- Category:
- How To,
- New Feature,
- News