Today, David Garrison, our guest blogger, will continue his series on the R2012b Desktop.
- Part 1: Introduction to the Toolstrip
- Part 2: Customizing the R2012b MATLAB Desktop
- Part 3: MATLAB Apps
Here is Part 2 of the series.
In Part 1 of this series, I provided an introduction to the new Toolstrip in MATLAB R2012b. I described the basic organization of the Toolstrip, the concepts of global and contextual tabs, and other ways that the Toolstrip adjusts to your current working context. Today, we'll talk about new ways to customize the R2012b Desktop.
MATLAB has historically provided a number of ways to manage the configuration of your Desktop. You can move windows around, resize them, even undock windows from the main Desktop. You can still do all of those things in R2012b and they pretty much work the same way. The only change in R2012b is that the window controls (maximize, minimize, undock, etc.) have been moved from the window's title bar to a drop down menu in the upper right hand corner of each window. The figure below shows the difference between R2012a and R2012b.
In Part 1, we described how to minimize and restore the Toolstrip. Minimizing the Toolstrip can be very useful when you need to maximize vertical space. But minimizing the Toolstrip is only the tip of the iceberg. There are several new ways in R2012b to customize your Desktop which we'll cover in the following sections.
If you look carefully at the picture above of the Current Folder in R2012b, you'll notice something else that's different. In R2012b, the toolbar in the Current Folder is not there. Don't worry, it hasn't disappeared, it's just in a different place. In R2012b, it's default location is below the Toolstrip. We moved it because in previous versions it could only be as wide as the Current Folder. By putting it under the Toolstrip, it's now as wide as your Desktop. This is very useful if you want to add additional buttons to your Current Folder Toolbar or if your current path happens to be long. Here's what it looks like in R2012b with some extra buttons that I use for easy access to MATLAB reports.
You can put the toolbar back inside the Current Folder if you want. However, I like the new position much better because it provides so much more room. To add extra buttons to the Current Folder Toolbar, right-click on it and then select "Customize...".
By now, you've probably noticed the light blue toolbar in the top right hand corner of the R2012b Desktop. That's called the Quick Access Toolbar. It's there to provide single click access to the Toolstrip functionality you use most often.
When you open MATLAB R2012b for the first time you'll notice that the Quick Access Toolbar is pre-populated with controls that are used throughout the Desktop including cut/copy/paste and undo/redo. These are useful things, of course, but there's more. Any control from the Toolstrip tabs can be placed in the Quick Access Toolbar so Toolstrip functionality is available to you anytime.
Let's imagine you're working on a project where you have to analyze a lot of data from files. To get your data into MATLAB, you will need to have easy access to the Import Tool. From the Home tab, you would simply right click on "Import Tool" and select "Add to Quick Access Toolbar".
Maybe you will also use box plots as part of your statistical analysis. From the Plots tab, you would right click on "boxplot" and add it to the Quick Access Toolbar. Any plot in the pulldown gallery of plots can be added in the same way.
Finally, your project will require that you do some curve fitting. For that, you would go the Apps tab and right click on "Curve Fitting" and add it to the Quick Access Toolbar.
After adding these three controls, your Quick Access Toolbar would look like this:
You can also add controls from Contextual tabs like the Editor. For example, you may want to have debugging controls easily accessible if you are debugging your code when the Editor is closed. Any control from the Toolstrip, even those in drop-down menus, can be added to the Quick Access Toolbar. You can even add your own shortcuts to the Quick Access Toolbar. More on that in the next section.
Removing icons is just as easy. Just right click on any icon in the Quick Access Toolbar and select "Remove from Quick Access Toolbar". Let's suppose you use keyboard shortcuts for cut, copy, paste, and other common operations. You can remove them as shown below. You can always put them back if you change your mind.
If you want to do more extensive customization, right-click anywhere in the Quick Access Toolbar and select "Customize..." A dialog box will appear that will allow you to add or remove items, rearrange the icons, or restore the factory defaults.
You may be wondering what happens if you want to add a lot of items to the Quick Access Toolbar. It looks like the Quick Access Toolbar has limited space. Happily, you can move the Quick Access Toolbar so it appears below the Toolstrip. By moving it below the Toolstrip, your Quick Access Toolbar can be as wide as your Desktop. If you do that it will look something like this:
Note that the Quick Access Toolbar and the Current Folder Toolbar can be together on a single line or on two separate lines like I've shown here.
If you're like me, you may find that you don't always remember what all those icons do. If that's the case, right click on any icon and select "Show Label". Using labels allows you to easily find what you need even if your Quick Access Toolbar has many items in it.
If you've put your most commonly used commands in the Quick Access Toolbar and only occasionally go back to the Toolstrip, you can minimize the Toolstrip to get a Desktop configuration that looks something like this.
So now let's talk about shortcuts. Shortcuts are small bits of MATLAB code that can be assigned to an icon in the MATLAB Desktop for single-click access. Shortcuts have been in MATLAB for a while. You can still create and use shortcuts in R2012b. They work the same -- they're just managed a bit differently.
There are several ways to create a shortcut -- from the New menu on the Home tab, from the Command History, and from the Quick Access Toolbar. When you create a shortcut, you will see the Shortcut Editor dialog.
The Shortcut Editor alows you to give your shortcut a name, add your MATLAB code, and select an icon. You can also specify if you want your Shortcut to appear in the Quick Access Toolbar. Once you create your first shortcut, you'll notice that a new Shortcuts tab appears.
Any shortcuts you had in your previous version of MATLAB will be available when you use R2012b. If you have a lot of shortcuts, you can use "Organize Shortcuts" on the Shortcuts tab. Clicking on "Organize Shortcuts" will display the Shortcuts Organizer dialog where you can create new categories and arrange your shortcuts. The categories you create will appear as sections on the Shortcuts tab. Here is an example.
Put your shortcuts in the Quick Access Toolbar for single click access. If you have a lot of shortcuts put the Quick Access bar below the Toolstrip like we did in the example above. You can also hide (or show) the Shortcuts tab. Go to the Environment section of the Home tab and select Layout->Shortcuts Tab.
We've added a lot of new customization features in the R2012b MATLAB Desktop. Have you tried out the Quick Access Toolbar or the new Shortcuts tab? How do you like to organize your Desktop? I'd love to hear your thoughts here.
As you can see, there are several new ways to customize your Desktop in R2012b. Try out some of the things we talked about. Next time we'll talk about another big new feature in R2012b - MATLAB apps.
Get the MATLAB code
Published with MATLAB® R2012b
Comments are closed.
15 CommentsOldest to Newest
When I first saw the toolstrip I was worried I would lose a lot of screen space to it. Now I know that you can minimize it, I’ve upgraded and it’s fine. I may even use more of the features! I think the help is less user friendly, though, despite the fact that I can have tabs.
However, I do agree with the comments on the previous post by Jolle and Ramiro – I haven’t heard many complaints about the UI in the past, but what many of us have been clamoring for is 21st century rendering capabilities. @Scott – I’m still holding my breath…
took couple of days to get used to the toolsrip and shortcut tabs. Am able now to locate most of my useful commands.
My only com
plaint is the lack of color adjustment for the toolstrip; the black on dark grey for small characters are difficult to apprehend
What happened to the Run Configurations? I cannot even find reference to it in the documentation – tried to search to run configurations and get a bunch of seamingly unlrelated links.
@Eric: Push the down arrow below the green play button. It has an option right there for the exact line of code you want to run:
Run: foo(pi,’hello world’);
@Sean: Yes, I see that, but it is not quite the same as Run Configurations. I used Run Configurations with scripts quite a bit and could have several lines of code evaluated before running the script, all under a single name. What you describe allows me to do the same by typing in all the commands, but on a single line and with no “naming” of the configuration, at least not that I can see. Also, Run Configurations had a nice window for building the configuration.
Great intro to the 2012b Desktop. Where can I find tools related to ‘Rapid Code Iteration’ that was present in a tool strip just above the editor window in several previous versions of Matlab including 2012a?
Those commands are still there just in a different place. In the Editor, select a numeric value, right click and select “Increment Value and Run Selection”. That will bering up a small dialog box with the plus/minus and divide/multiply controls that let you change the value and run the section in the file.
One particular customization option that I am still missing is the ability to add custom plots to the plot tab / plot catalog. Are there any plans to support this functionality in the future? The way things are currently designed, both the plots and the apps tabs are pretty useless for my daily work…
So instead of showcasing one of the most helpful features no one knows about you hid it in a context aware right-click menu instead? That seems really counter intuitive to what you guys are trying to do. Especially when there is so much empty space left on the editor tab.
Great. You have improved the interface in a way that makes Matlab easier to use for any Office user anywhere. Perhaps even small children could benifit by being able to click on the big buttons.
You have forgotten who your user base is. Can you really mention Fourier transform and Simulink in the same sentence as ribbons and not understand that something has gone terribly wrong. Someone has blindly followed the Microsoft ribbon paradigm without realizing that ribbons are already dead and the rest of the world has moved on.
I am angry, deeply disappointed and ashamed for the direction that you have taken this product. You have cost me days of just trying to find out where all the features are buried and so have most of the rest of your users. Where is the ‘revert to menus’ option. I still can’t find it.
Solution: Next release display a dialog with two choices: beginner/student in grade 4 and another option expert. Why frustrate and alienate your entire user base… because Microsoft said and you want to make it ‘easier’ for all your users? For shame.
My thoughts on 2012b:
Initial reaction is that it’s horrible for debugging. Here’s a use case:
– You’ve got a function/script that opens a figure and you want to debug it.
– You run the script with a breakpoint before the figure gets made.
– You step through the lines that make the figure using the visually prominent “Step” button
– The figure by default is undocked so it goes behind the desktop when you hit “Step”. No problem – change windows and dock the figure.
– You look up at the ribbon… “Step” has disappeared and you’re back at the “Home” tab. Well that’s weird – never mind I’ll just find the “Editor” tab and activate it so I can step… Oh, there’s no “Editor” tab…
– Ok, I’ll click in the Editor then go to the “Step” button
– Now I want to check out the changes it made to my plots… click on the figure
– Now I want to step through a few more lines… oh, the Editor tab is hidden again.
In this use case, all I want to do is step through lines and play with figures. 2012b is inferior to 2012a in this respect. Strangely, if you click on a figure while you’re *not* debugging, the “Figure” tab is activated. If you’re debugging, the “Home” tab is activated. This feels inconsistent.
Next, the buttons are nice and friendly… alas this means they take up a larger footprint. In 2012a you could arrange “single-line” button strips to cover the desired real estate. In 2012b you’ve got to decide to chew up a big chunk of the screen with buttons, or reduce everything to the shortcut bar (which squashes everything you put there without any visual separation).
I think I could get by nicely with the “current folder” toolbar and “quick access” bar if I could customise them both… alas again, the current folder (which takes the whole screen width unless it’s put under the current folder box) is limited to buttons to do with folder browsing. Interestingly, the “current folder” can be customised to have separators. Why oh why can we put separators on a bar with 4 buttons, but we can’t put separators on the bar with potentially many many buttons?
I have to admit that the major benefit to upgrading so far is that after I hid the ribbon completely, I was forced to learn the shortcuts keys to all the debugging events like step/step in/step out/evaluate cell and advance/stop execution/etc because I couldn’t afford the real-estate on the shortcut bar to have them all available. This is an increase in productivity but I suspect not the type that TMW was aiming for :)
I agree with @zardoz, @wei in the part1 blog entry: the removal of the tree-structure is a downgrade.
I know that there’s a little tree-like button next to the search bar that kind of does a similar thing, but it’s quite frustrating to use:
1. It seems to get regenerated on-demand each time you click it so there’s a little lag between clicking it (or expanding any branch) and seeing results. In 2012a the tree was pre-populated and snappy.
2. Any time you click one of the branches or leaves on the tree, the tree itself disappears and takes you to the clicked page. If you again click on the little tree it at least opens to the branch you were on (yay!) but this prevents a typical use case:
– You are browsing
– You see a set of topics that are interesting (such as the 5 or 6 under MATLAB>Mathematics>Linear Algebra)
– You want to click on one, check out it’s contents, then click on the next one
– In 2012a with the tree to the left of the pages you could do this and very quickly explore documents with “context” of where you were. In 2012b it would take longer and more clicks, with each click jolting you from looking at a tree menu to looking at a docs page (now with the context in a different spot on the page to where you selected it).
3. Any sense of context is lost as soon as you scroll down. The breadcrumb context that you have (which is in a different format to the context tree you clicked on) is at the top of the page and the top of the page only. Having tabs is great and I’m the type of user who has 20 browser tabs open in chrome and 10 help tabs open in MATLAB. The difference is that at a glance I know the “context” from the address in my chrome address bar even if I’m at the bottom of a page. I get no such cue in MATLAB help tabs.
4. Similar to point 3, the fact that the little tree button is at the top of the page only ensures that there’s another obstacle if you want to browse the help docs – when you want to browse to another branch in the tree, you need to scroll to the top of whatever page you were looking at.
5. The tree, such as it is, seems to be generated separately for each toolbox. In 2012a I had 16 toolbox helps neatly at the root of a tree. Now I’ve got 16 separate trees.
6. The tree, such as it is, seems buggy and inconsistent.
– Enter the Data Acquisition Toolbox
– Click the tree icon. You see a set of blue links with equal prominence.
– Click the “Analog Input and Output” tree hyperlink. You get shown a page with the “Analog Input and Output” section expanded.
– Click the tree again, go instead to “Digital Input and Output”. Nothing changes, you’re still at the screen with the “Analog Input and Output” section expanded.
– Click the tree again and click on “Counter and Timer Input and Output”. Even though it’s on the same “level” as “Digital/Analog Input and Output”, you get taken to a different type of page entirely. There was no visual indication in the tree of what to expect, and whenever you click, the context that you had at your disposal disappears. It’s disorienting.
– Click the tree again and go again to “Digital Input and Output”. You’re now looking at a different result (the Digital section is expanded instead of the Analog section) from previously when you clicked the exact same button.
Yes, I’m picky about the help (I’ve made suggestions before: http://blogs.mathworks.com/community/2009/10/05/slimming-down-the-help-browser/) – but it’s a well-known feature of MATLAB over other (free-er) packages.
Ok, that’s enough for now, but I will reiterate the sentiment of others: it’s a bit jarring that the choice of features to overhaul seems incongruent with the actual features people want overhauled (nod to those wanting a graphics package that lets you smoothly pan/zoom/rotate 3d figures)
Oh, and I forgot the ask the question that I originally came here for!
In 2012a, the shortcut CTRL+U changed highlighted text to upper case, and CTRL+SHIFT+U changed to lower case. In 2012b these shortcuts instead dock/undock entities. In 2012a if I didn’t know the shortcut for something I could look for it in menus. In 2012b I have no menus thus no way to know if upper/lower case has been mapped to a new shortcut key or been removed completely.
By the way, just to make sure I’m not only complaining, let me say that the update (in 2011b or whenever it came) to allow the changing-throughout-the-scope of one variable name to another (via SHIFT+ENTER) is hands down the most useful and time-saving desktop environment feature that I can think of. No generic text editor could replicate it (because it couldn’t know the scope of variables). Please make more changes like that ;) Ability to do the same with fields of structures might be a bit tricky to implement, but it would be just as highly valuable.
Regarding debugging issues: There are two possible solutions to the problem you have described.
1) Undock the editor. That way the editor tabs are always visible regardless of what’s happening in other parts of the desktop.
2) Put the debugging controls into your Quick Access Toolbar. That way they are always available regardless of which desktop client window has focus.
Regarding separators in the quick access toolbar and the table of contents in the Help browser: These are things that we have heard about. Stay tuned. I would strongly encourage you to download the R2013a pre-release to see what we’ve done to address these concerns.
Regarding the keyboard shortcuts: You can override the default shortcuts from the Keyboard -> Shortcuts panel in the Preferences. Currently upper and lower case do not have keyboard shortcuts.
Thanks for your comment about automatic variable renaming.
Thanks for the quick reply. For suggestion (1), the main reason I work with a docked editor is that I often have 2 (or more) MATLAB windows open… in the age of multi-core pcs, it’s quite useful when I’m writing code that runs for ~10mins at a time to switch between a couple of instances so that I can work on the next problem while the last is (hopefully) running. This means that on Windows 7 the “MATLAB” items under the MATLAB button on the taskbar can get unmanageable pretty quickly. It’s easier for me to keep most things docked so that I only see one application per MATLAB instance (ie, it would be difficult to keep track of which editor belongs to which instance if they were undocked).
For point (2) – that’s what I’ve ended up doing in combination with learning the shortcut to some of the less-used debugging buttons (like step-in/step-out).
I really think that with the “Current Folder Bar” it was *almost* ideal for an experienced matlab user who wants to be tidy with real-estate. If we could just use that bar like the shortcuts bar, then we could have a full row of real estate (the address bar itself doesn’t need to cover the whole screen) in addition to the shortcut bar, which would allow a user to place distinct “themes” of buttons (like publishing, debugging, editing) in visually separate locations.
I’ll check out the pre-release, it sounds like it goes in this direction.
Well, seeing all the upset feelings about the new interface I must be in a minority since I think change is good. I’ve been using matlab for 20+ years since the very first MS-DOS incarnations both in academia and in “the real life”. Of course I have my own way of working which isn’t really affected by the UI.
There are other things I would like to see change (for example expanding the capability of the built-in editor, and some of the error messages). But I can’t just get the same emotional response that seems so common here. In my area (communication & signal processing) there hasn’t bee any real advances in matlab core functionality in almost 10 years that really affected us in major way.
However there is one change in 2012b that I think MathWorks really needs to retract and that is the new Help system. Removing the left side tree structure also removes the overview which cannot be replaced by either the breadcrumbs or the dynamic tree-view. Call it an experiment that didn’t work. No harm in that – you tried it -It didn’t work, so just go back to the old way. The Help system is really the only UI part of Matlab I use – so maybe that is way I’m not so bothered by the “other” stuff. Matlab needs to evolve, evolution sometimes take a detour until it finds the right way.