
Controlling Input
• “Tab Completion for Properties” on page 3-25
Basic Example — Unique Completion
This example illustrates a basic use for tab completion. A fter creating a
variable,
costs_march,type
costs
and press Tab. MATLAB automatically completes the name of the variable,
displaying
costs_march
Then complete the statement, adding any arguments, operators, or options,
and press Return or Enter to run it. In this example, if you just press
Enter, MATLAB displays the contents of
costs_march. If MATLAB does not
complete the name
costs_march but instead moves the cursor to the right,
youdonothavethepreferencesetfortabcompletion.IfMATLABdisplays
No
Completions Found
, costs_march does not exist in the current workspace.
Yo u can use tab completion anywhere in the line, not just at the beginning.
For example, if you type
a = cost
and press Tab, MATLAB completes costs_march. You can also select co or
position the cursor after
co and pres s Tab to complete costs_march.
Multiple Possible Completions
If there is more than one name that starts with the characters you typed,
when you press the Tab key, M ATLA B displays a list of all nam es that start
with those characters. For example, type
cos
and press Tab.MATLABdisplays
3-21
Komentarze do niniejszej Instrukcji