MATLAB Release Notes |
|
Running Functions--Command Window and History
See the complete Running Functions documentation online.
Command Window Features
If you are using the Help browser, watch the new Desktop and Command Window video demo for an overview of the major functionality.
Additions. These are new features in the Command Window.
- Tab completion now has a graphical interface. For example, type
cos
and press the Tab key. A list of functions that begin with cos
appears. Double-click the function you want and MATLAB completes the name in the Command Window. Alternatively, when the list of names appears, you can type the next unique letter in the name, and the first name in the list that matches it is selected. Continue typing unique letters to select the name you want, and press Enter. Press Escape to clear the list without selecting a name.
- There is a new preference that allows you to use arrow keys to navigate in the Command Window instead of recalling history.
- The incremental search interface has been updated. It now indicates the search direction. It is also case-sensitive when you enter uppercase letters in the search field.
- Use the new
commandwindow
function to open the Command Window when it is closed (for example, from an M-file), or to select the Command Window when it is already open.
- On Macintosh platforms, you can now use Command+. (Command key and period key) to stop execution of a running program.
Changes. These features operate differently in this release.
- When you include an ellipsis in a statement so that you can continue the statement on the next line, any text you type after the
...
on the same line is considered to be a MATLAB comment and now is syntax highlighted as a comment. In previous releases, the syntax highlighting did not indicate the text after the ...
as a comment.
- Evaluate selection (available from context menus for various tools) no longer appends the selection to the statement at the prompt, but instead runs the selection. Make a selection and press Enter or Return to append the selection to the statement at the prompt and execute it.
- The default colors for syntax highlighting have been modified. Unterminated strings are now maroon, while terminated strings are now purple. This is the opposite of previous versions. Maroon is considered to be more of an "alerting" color, resembling the default of red for errors, which is the reason for the change. If you prefer the colors used in previous versions, change them using preferences--see Syntax Highlighting Colors in the online documentation.
In addition, arguments in statements entered using command syntax rather than function syntax are highlighted as strings, emphasizing that variables in command syntax are passed as literal strings rather than as their values.
- Stopping execution using Ctrl+C (^C) has changed. Windows and UNIX platforms now respond similarly to Ctrl+C, and in general, stop execution without the need for
pause
or drawnow
statements in your M-files. For M-files that run for a long time, or that call built-ins or MEX-files that take a long time, Ctrl+C does not always effectively stop execution. In that event, include a drawnow
command in your M-file, for example, within a large loop. Ctrl+C might be less responsive if you started MATLAB with the -nodesktop
option.
Command History Features
- If you are using the Help browser, watch the new Command history video demo for an overview of the major functionality.
- Entries in the Command History tool now appear with syntax highlighting.
- Entries in the Command History now appear in a tree view so you can minimize the length of the visible history. The top level nodes of the tree are the dates/times for each session, and beneath that is the history for that session. Click the - to the left of a date/time to hide the history entries for that session. Click the + to the left of a date/time entry to show history entries for that session.
- Use the new
commandhistory
function to open the Command History when it is closed, and to select it when it is open.
- The default for saving the history has changed. Now, by default, MATLAB saves the history file after five statements have been added to the history. You can modify the frequency using Command History preferences.
| Startup and Shutdown | | Help for Using MATLAB | |
© 1994-2005 The MathWorks, Inc.