Sei sulla pagina 1di 17

Presentation with Scilab

by
Hrishikesh Khaladkar
Department of Mathematics
Fergusson College, Pune-4

September 9, 2015

H.K. Presentation with Scilab September 9, 2015 1 / 17


Presentation with Scilab

Introduction

What is Scilab

Cross platform Numerical Computational Package and a


High level Numerically oriented Programming Language.
It is used in Signal Processing, Statistical Analysis, Image
Enhacement, Fluid Dynamic Simulations, Numerical
Optimizations , Modelling and Simulations of Explicit and Implicit
Dynamical Systems and its related symbolic manipulations.

H.K. Presentation with Scilab September 9, 2015 2 / 17


Presentation with Scilab

Brief History

Scilab was created in 1990 by researchers from INRIA (Institut


National de Recherche en Informatique et en Automatique) and
ENPC(Ecole Nationale des ponts et Chaussees)in France.
Initially named as ΨLab (PsiLab)
In order to improve the technology transfer the Scilab Consortium
joined the Digiteo Foundation in July 2008
In July 2010 the Consortium announced the creation of Scilab
Enterprises. Scilab Enterprises developes and markets directly or
through an International Network of affiliated Service Providers a
comprehensive set of Services for Scilab Users.It also developes
and maintains the Scilab Software.
More information is avaliable on www.scilab-enterprises.com
H.K. Presentation with Scilab September 9, 2015 3 / 17
Presentation with Scilab

Open Source

It is a Cross platform Software with versions avaliable for the following


UNIX(Solaris,HP-UX)
Microsoft Windows(9x,XP,Vista,7,8)
BSD(FreeBSD,Mac OS X,NetBSD,OpenBSD)
Linux(Red Hat,Debian GNU/Linux,Arch,Gentoo)
Currently the Scilab version 6.0.0 is avaliable with many
latest updated features

H.K. Presentation with Scilab September 9, 2015 4 / 17


Presentation with Scilab

Some inbuilt Packages with Scilab

Math Packages: Elementary Functions, Linear Algebra,


Differential and Integral Calculus, Polynomials,Interpolations,
Special Functions, Sparse Matrices, Statistics
Application Packages: : CACSD (Computer Aided Control
Systems Design), Fast Fourier Transforms and
Wavelets,Optimization and Simulations,Genetic Algorithms,
Signal Processing, Sound File Handling
System Packages: Data Structures,
Strings,Boolean,Input-Output functions, Advanced functions,
Console,Time and date
Computer Application Packages: : Graphics, GUI,
Graphics:exports and printing, UI Data, Online help Management
H.K. Presentation with Scilab September 9, 2015 5 / 17
Presentation with Scilab

Some inbuilt Packages with Scilab

Other software Compatibility Packages: Matlab to Scilab


Conversion Tips, Compatibility Functions,JAVA from Scilab, Java
Interface,call Scilab API (Scilab Engine)
Xcos: is package for modelling and Simulations of Explicit and
Implicit Dynamical Systems including both continuous and
discrete sub-systems. Xcos is open source equivalent to Simulink
from MathWorks

H.K. Presentation with Scilab September 9, 2015 6 / 17


Presentation with Scilab

Scilab Contributions

Scilab Image Processing Toolbox (SIP) and its invariants (SIVP)


Scilab Wavelet Toolbox
Scilab JAVA and .NET Module
Scilab MySQL
Equalis Communication Systems Module
Equalis Signal Processing Module
SoftCruncher Performance Accelerator

H.K. Presentation with Scilab September 9, 2015 7 / 17


Presentation with Scilab

Matrix and its operations

A = [1strow ; 2ndrow ; 3rdrow ]


inv (A) :to find the inverse of the matrix A
det (A): to find the determinant value of the matrix A
size (A): to get the dimension of the matrix A
length (A): to get the total number of elements of the matrix A
eye (4, 4): to get the identity matrix of order 4 × 4
zeros (3, 5): to get a 3 × 5 matrix whose all entries are zero
ones (3, 2): to get a 3 × 2 matrix whose entries are one

H.K. Presentation with Scilab September 9, 2015 8 / 17


Presentation with Scilab

Matrix and its operations

A (m, n): to get a element which is at the intersection of mth row


and nth column
A (m, :): To get the mth row of the matrix A
A (:, n) :to get the nth column of the matrix A
rand (m, n): To get a matrix whose elements are randomly chosen
between 0 and 1.
int (10 ∗ rand (3, 2)): to get matrix of order 3 × 2 randomly whose
elements are integers
rank (A): To get rank of the matrix A
rref (A): To get reduced row echelon form of the matrix A
diag ([2, 3, 4]): To get a matrix whose diagonal elements are 2,3
and 4 and rest all elements are zero
H.K. Presentation with Scilab September 9, 2015 9 / 17
Presentation with Scilab

Matrix and its operations

A (m, n): to get a element which is at the intersection of mth row


and nth column
A (m, :): To get the mth row of the matrix A
A (:, n) :to get the nth column of the matrix A
rand (m, n): To get a matrix whose elements are randomly chosen
between 0 and 1.
int (10 ∗ rand (3, 2)): to get matrix of order 3 × 2 randomly whose
elements are integers
rank (A): To get rank of the matrix A
rref (A): To get reduced row echelon form of the matrix A
diag ([2, 3, 4]): To get a matrix whose diagonal elements are 2,3
and 4 and rest all elements are zero
H.K. Presentation with Scilab September 9, 2015 10 / 17
Presentation with Scilab

Matrix and its operations

If A is any 3 × 3matrix and is any real number then a non zero vector X
in R3 is called an eigenvector of A if AX = λX

The value of λ is called as an eigenvalue of A


The vector X is called as an eigenvalue of A
OR Equivalently
If A is any 3 × 3 matrix and is any real number then λ is an
eigenvalue of A if and only if det (λI − A) = 0

For
 example consider
 the matrix
2 1 1
 2 3 4 
−1 −1 −2
then eigenvalues of A are given by λ = 1, λ = −1 and λ = 3
H.K. Presentation with Scilab September 9, 2015 11 / 17
Presentation with Scilab

Matrix and its operations


Given a matrix A
evals = spec (A) : stores the eigenvalues of A in the vector evals
[R, diagevals] = spec (A) displays the diagonal matrix with
eigenvalues on the diagonal and the matrix R containing the
eigenvectors
Consider the system of 3 equations in 3 variables given by AX = b
where A is a 3 × 3 co-effecient matrix and b is the column 3 × 1 vector

[A b] is the augumented matrix of order 3 × 4 consisting of the


matrix A and the column vector b
[ker X ] = linsolve (A, −b) will solve the linear system of equations
above incase the solution exists
H.K. Presentation with Scilab September 9, 2015 12 / 17
Presentation with Scilab

Polynomials

A polynomial function of degree atmost n given by


p(x) = a0 + a1 x + a2 x 2 + ......an x n where an 6= 0
A root of a polynomial is a value r such that p(r ) = 0

p = poly ([List of coefficients],0 x 0 ,0 coeff 0 ): will display a


polynomial of the given deegre in the variable x with the
coefficients mentioned in the list
roots(p): will display the roots of the polynomial p
p = poly ([List of roots],0 x 0 ): will display a polynomial whose
roots are the elements mentioned in the List

H.K. Presentation with Scilab September 9, 2015 13 / 17


Presentation with Scilab

Special values and Complex Numbers

%pi: gives the value of π(3.1415927)


%e: gives the value of e(2.7182818)
z1 = 2 + 3%i: displays the complex no 2 + 3i
z1 + z2: displays the addition of two complex numbers
z1 ∗ z2: displays the multiplication of two complex numbers

H.K. Presentation with Scilab September 9, 2015 14 / 17


Presentation with Scilab

2D function plots

t = −%pi : 0.1 : %pi : displays the range of values that the


parameter t takes with the mentioned interval size
plot (sin(t)) : plots the function sin(t) for the range of t mentioned
above
plot (sin(2 ∗ t)) : plots the function sin(2t) for the range of t
mentioned above

H.K. Presentation with Scilab September 9, 2015 15 / 17


Presentation with Scilab

3D function plots

x = −3 : 0.2 : 3 : displays the range of values that the parameter x


takes with the mentioned interval size
y = x : assigns the value of x to y
deff 0 z = f (x, y )0 ,0 z = x 2 + y 20 : defines z as function of two


variables x and y by the given definition


fplot3d (x, y , f ): plots the corresponding 3 dimensional plot

H.K. Presentation with Scilab September 9, 2015 16 / 17


Presentation with Scilab

Thank You !!!

H.K. Presentation with Scilab September 9, 2015 17 / 17

Potrebbero piacerti anche