The Command window
So far, you have been using the SCILAB command line, typing commands and expressions, and seeing the results printed in the command window. This section describes a few ways of altering the appearance of the command window. It is better to use fixed width font such as fixedays or courier to provide proper spacing.
The format Command
Theformat
command controls the
numeric format of the values displayed by SCILAB. The command affects only how
numbers are displayed, not how SCILAB computes or saves them. Here are the
different formats, together with the resulting output produced from a vector s
with components of different magnitudes.
s = [ 10/3 1.234567e-6]
format('v',10);s
s =
! 3.3333333 .0000012 !
format(20);s
s =
! 3.3333333333333335 .00000123456700000 !
format('e',10)s
s =
! 3.333E+00 1.235E-06 !
Suppressing Output
If you simply type a statement and press Return or Enter, SCILAB automatically displays the results on screen. However, if you end the line with a semicolon, SCILAB performs the computation but does not display any output. This is particularly useful when you generate large matrices.For example,
s = rand(1,100);
Long Command Lines
If a statement does not fit on one line, use three periods,...
, followed by Return or Enter
to indicate that the statement continues on the next line. For example
=
, +
,
and -
signs are optional, but they improve readability
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 entersqrt
. SCILAB responds with
r
. Repeated use
of the The list of available command line editing keys is different on different computers.
![]() |
ctrl-p |
Recall previous line |
![]() |
ctrl-n |
Recall next line |
![]() |
ctrl-b |
Move back one character |
![]() |
ctrl-f |
Move forward one character |
home |
ctrl-a |
Move to beginning of line |
end |
ctrl-e |
Move to end of line |
esc |
ctrl-u |
Clear line |
del |
ctrl-d |
Delete character at cursor |
backspace |
ctrl-h |
Delete character before cursor |
ctrl-k |
Delete to end of line |