of 24
8/8/2019 SCILAB for Numerical Analysis
1/24
8/8/2019 SCILAB for Numerical Analysis
2/24
8/8/2019 SCILAB for Numerical Analysis
3/24
basicconstant
stringboolean
morepolynomial
functionhandle
8/8/2019 SCILAB for Numerical Analysis
4/24
Integers
14159 -3142
Floating-point
1.354 -123.984
Scientificnotation
12e3 23.451e-7
8/8/2019 SCILAB for Numerical Analysis
5/24
%pi %i %e
Numeric
%t %f
Boolean
%s %z
Polynomial
8/8/2019 SCILAB for Numerical Analysis
6/24
started by letters andunderscore
followed by a letter, anumber orunderscore
Rules
8/8/2019 SCILAB for Numerical Analysis
7/24
Values True - %t False - %f
Usage Used in programming Setting conditions before
computation
8/8/2019 SCILAB for Numerical Analysis
8/24
+, -, *, /, \, ^, **
ARITHMETIC
=
ASSIGNMENT
>, >=,
8/8/2019 SCILAB for Numerical Analysis
9/24
sin, cos, tan asin, acos, atanTrigo log, log10
expLog
sqrtSqrt
8/8/2019 SCILAB for Numerical Analysis
10/24
8/8/2019 SCILAB for Numerical Analysis
11/24
Demo
Basic programming
8/8/2019 SCILAB for Numerical Analysis
12/24
Creating a matrix
[] enclosed in a bracket
, or space - column ; or enter key - row
8/8/2019 SCILAB for Numerical Analysis
13/24
Generating a matrix
j:k, j:i:k linspace(i,k,n) testmatrix (magi,n )
8/8/2019 SCILAB for Numerical Analysis
14/24
Manipulating a matrix $ (last index) : (all indices) a(r,c) a([1,2],[2,3]) a([1,2;1,2],[1,2;2,3]) [] null matrix
8/8/2019 SCILAB for Numerical Analysis
15/24
Matrix operation
+,-,* a/b is a*inv(b) a\b is inv(a)*b .*, ./, .\, .^ (elementwise)
8/8/2019 SCILAB for Numerical Analysis
16/24
8/8/2019 SCILAB for Numerical Analysis
17/24
Demo
Basic programming
8/8/2019 SCILAB for Numerical Analysis
18/24
if
if
elseif
elseif
else
end
select
select case
case
else
end
8/8/2019 SCILAB for Numerical Analysis
19/24
for for
=
end
while while
end
8/8/2019 SCILAB for Numerical Analysis
20/24
Demo
Basic programming
8/8/2019 SCILAB for Numerical Analysis
21/24
-
--
:
-.
Styles
r
g
b
c
Color
m
y
k
w
Color
+
o
*
.
s
Marker
d
^
>