[go: up one dir, main page]

0% found this document useful (0 votes)
91 views11 pages

Scilab

This document provides an introduction and overview of key concepts for the Scilab software environment, including: 1. Downloading and installing Scilab on different operating systems like Windows and Linux. 2. Performing basic mathematical operations in Scilab like addition, subtraction, multiplication, division, and handling imaginary numbers. 3. Working with matrices, including defining, adding rows, and performing row/column operations. 4. Using conditional and loop statements like if/else, case, for, and while. 5. Creating and calling user-defined functions within Scilab files. 6. Generating 2D plots of functions by specifying x and y ranges and labels.

Uploaded by

Ritesh Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
91 views11 pages

Scilab

This document provides an introduction and overview of key concepts for the Scilab software environment, including: 1. Downloading and installing Scilab on different operating systems like Windows and Linux. 2. Performing basic mathematical operations in Scilab like addition, subtraction, multiplication, division, and handling imaginary numbers. 3. Working with matrices, including defining, adding rows, and performing row/column operations. 4. Using conditional and loop statements like if/else, case, for, and while. 5. Creating and calling user-defined functions within Scilab files. 6. Generating 2D plots of functions by specifying x and y ranges and labels.

Uploaded by

Ritesh Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 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