Getting Started |
Command Line Editing
Various arrow and control keys on your keyboard allow you to recall, edit, and reuse statements you have typed earlier. For example, suppose you mistakenly enter
You have misspelled sqrt
. MATLAB responds with
Instead of retyping the entire line, simply press the key. The statement you typed is redisplayed. Use the key to move the cursor over and insert the missing r
. Repeated use of the key recalls earlier lines. Typing a few characters and then the key finds a previous line that begins with those characters. You can also copy previously executed statements from the Command History. For more information, see Command History.
Following is the list of arrow and control keys you can use in the Command Window. If the preference you select for Command line key bindings is Emacs (MATLAB standard), you can also use the Ctrl+key combinations shown. See also general keyboard shortcuts for desktop tools.
Entering Long Statements | Graphics |