Installation guide
3 Running Functions — Command Window and History
Enter Multiple L
ines Without Running Them
To enter multipl
e lines before running any of them, use Shift+Enter or
Shift+Return af
ter typing a line. This is useful, for e xample, w hen entering
a set of statemen
ts containing keywords, such as
if ... end. The cursor
moves down to th
e next line, which does not show a prompt, where you can
type the next li
ne. Continue for more lines. Then p ress Enter or Return
to run all of the
lines.
This allows you
to edit any of the lines you entered before yo u pressing Enter
or Return.
Entering Mult
iple Functions in a Line
To enter multi
ple functions on a single line, separate the functions with a
comma ( , ) or se
micolon (
; ). Using the semicolon instead of the comma will
suppress the
output for the command preceding it. For example, put three
functions on
onelinetobuildatableoflogarithmsbytyping
format short; x = (1:10)'; logs = [x log10(x)]
and then pres
s Enter or Return. The functions run in left-to-right order.
Entering Lon
g Statements (Line Continuation)
If a statemen
t does not fit on one line, enter three periods (
...),alsocalled
dots, stops,
or an ellipsis, at the end of the line to indicate it continues on
the next lin
e. Then press Enter or Return. Continue typing the statement
on the next l
ine. You can repeat the ellipsis to add a line break after each
line until y
ou comple te the statem e nt. When you finish the statement, press
Enter or Ret
urn.
For items i
n single quotation marks, such as strings, y ou must complete the
string in t
he line on wh ich it was started. For example, completi ng a string as
shown here
headers = ['Author Last Name, Author First Name, ' ...
'Author Middle Initial']
results in
3-18