Both sides previous revisionPrevious revision | |
matlab_-_introduction [2012/10/08 14:44] – added more info on GUI elements jochen | matlab_-_introduction [2012/11/12 16:52] (current) – [Command line] jochen |
---|
The command line allows the user to enter commands and inspect returned values (text output intermixed with input). Matlab shows a prompt (**''<nowiki>>></nowiki>''**) during normal operation and an extended prompt for debugging (**''<nowiki>K>></nowiki>''**). The command line offers a few additional functions which are extremely helpful: | The command line allows the user to enter commands and inspect returned values (text output intermixed with input). Matlab shows a prompt (**''<nowiki>>></nowiki>''**) during normal operation and an extended prompt for debugging (**''<nowiki>K>></nowiki>''**). The command line offers a few additional functions which are extremely helpful: |
* pressing the **''cursor-up''** key allows to cycle through previous commands, and if some text is entered before, only entries matching this text are presented | * pressing the **''cursor-up''** key allows to cycle through previous commands, and if some text is entered before, only entries matching this text are presented |
* the **''tab''**-key does not produce a tab-character (indentation) but instead Matlab attempts to auto-complete a series of letters to a "known expression" (variable, field, or function name) | * the **''tab''**-key does not produce a tab-character (indentation) but instead Matlab attempts to auto-complete a series of letters to a "known expression" (variable, field, function, or file name, depending on context) |
* when entering expressions with parenthesis (precedence of operations, function arguments, etc.) or brackets/curly braces, Matlab highlights matching pairs to confirm the completeness of the expression | * when entering expressions with parenthesis (precedence of operations, function arguments, etc.) or brackets/curly braces, Matlab highlights matching pairs to confirm the completeness of the expression |
* if an expression is incomplete (e.g. a **''for''** loop is constructed, but the final **''end''** keyword is missing), Matlab expects additional input on the next line (after pressing return) | * if an expression is incomplete (e.g. a **''for''** loop is constructed, but the final **''end''** keyword is missing), Matlab expects additional input on the next line (after pressing return) |