Title here
Summary here
Scilab has various value types including strings, integers, floats, booleans, etc. Here are a few basic examples.
// Strings, which can be added together with +
disp("sci" + "lab")
// Integers and floats
disp("1+1 =")
disp(1 + 1)
disp("7.0/3.0 =")
disp(7.0 / 3.0)
// Booleans, with boolean operators as you'd expect
disp(%t & %f)
disp(%t | %f)
disp(~%t)
To run this Scilab script, save it to a file (e.g., values.sce
) and execute it in Scilab:
--> exec('values.sce', -1)
scilab
1+1 =
2.
7.0/3.0 =
2.3333333
F
T
F
In Scilab:
+
operator.%t
(true) and %f
(false).&
(and), |
(or), and ~
(not).disp()
function is used to print values to the console.Note that Scilab uses 1-based indexing and has a focus on matrix operations, which makes it particularly suited for numerical computations and scientific applications.