You are on page 1of 11

Contents

Introduction To Scilab.....................................................................................................................................................2
Downloading And Installing.............................................................................................................................................2
Mathematical Operations...............................................................................................................................................3
Matrices.......................................................................................................................................................................... 6
ConditionalBranching....................................................................................................................................................10
Loop Statements...........................................................................................................................................................11
Functions....................................................................................................................................................................... 13
Plot 2D function............................................................................................................................................................13
Introduction To Scilab

www.scilab.org www.scilab.in spoken-tutorial.org

1. The word Scilab is made up of two words Sci means Scientific and lab means
Laboratory
2. It is Free and Open Source (FOSS) software Available for various OS (Windows ,Linux ,
….)
3. It is a Mathematical and scientific calculation software which works as a substitute for
MATLAB
4. It is also a high productivity tool means one can quickly develop the code required to solve
problems. Typically, if it takes ten lines of C code for some calculation, Scilab would require
only one for the same purpose.

Downloading And Installing


Mathematical Operations

To clear the screen clc


By default result is stored
in ans variable

When we want to know the


value of particular variable
we type its name and we
will come to know about its
value
To print current working
directory and create text
file there which will save all
your commands

To stop saving your


commands

Handling imaginary no

Predefined variables Pi

Minimum floating point no

Representing Exponential
Representing Log

To get the help about


command

Matrices

Defining a matrix
Power of matrix
Adding row to a matrix

Performing row or column operation


Solution to linear
Equations
ConditionalBranching

If else

Case

Loop Statements

For
while
Functions

Write the function in sci notes and save it in the current directory with the extension .sci

c is the input parameter and a,b are output parameters

Then load the function in Scilab by

Now once loaded it can be called by

Plot 2D function

clf
x=[-1:.01:20]'
plot2d(x,[x-4,cos(x)],[7,9],leg="a@b")
xtitle("a","x","y")
a=gca();
a.x_location = "origin";
a.y_location = "origin";

You might also like