Getting Started | ![]() ![]() |
Command Line Editing
Various arrow and control keys on your keyboard allow you to recall, edit, and reuse commands you have typed earlier. For example, suppose you mistakenly enter
rho = (1 + sqt(5))/2
You have misspelled sqrt
. MATLAB responds with
Undefined function or variable 'sqt'.
Instead of retyping the entire line, simply press the key. The misspelled command 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 commands from the Command History. For more information, see Command History.
The list of available command line editing keys is different on different computers. Experiment to see which of the following keys is available on your machine. (Many of these keys will be familiar to users of the Emacs editor.)
![]() | Entering Long Command Lines | Graphics | ![]() |