Typing several commands to run at the command line can be tedious and hard to read. After typing in several long commands, the text scrolls way over and it is hard to see exactly what has been typed. In the example below, I typed several commands to generate the quiver plot.
To make the code easier to read and to make MATLAB wait while you type more commands, hit shift-enter as you enter commands. This adds a new line in the Command Window without executing the code that has already been typed. Another advantage of using shift-enter to type commands in the Command Window is that the commands are added to the Command History as separate commands instead of as one big command.
This example is from the 3-D Demo, Quiver section.
By
Kristin Thomas
Kristin is a developer on the MATLAB Desktop team. She works primarily on the Command Window when she is not throwing herself down a mountain on her snowboard.
Hey, that’s a good one. I didn’t know about that!
If you change the grid in x or y in your example, you will have to repeat all the following commands one by one to get the plot updated. In my opinion it would be better to have all the lines as one big command in the command history.
Markus - My example may not the best. I am sure there are times when one approach will be better than the other. I’m just trying to show that the option exists.
This is an off topic question.
Is it possible to just select a few variables of interest in the workspace browser window and hide the rest? This way, I can monitor and change them without getting distracted by the others.
It would be nice to be able to at least drag the variables of interest to the top of the window.
This is perhaps not a “must have” facility. I just felt that it would be convenient to have it.
Hi Ravi,
I’ve forwarded your comments to our developer for the Workspace browser to consider for a future release.