SlideShare a Scribd company logo
P. R. Naren
School of Chemical & Biotechnology (SCBT)
prnaren@scbt.sastra.edu
at
National Conference on Advances in Process Engineering
CAPE-2013
SASTRA University
Thanjavur, Tamilnadu 613 401 INDIA
19th October 2013
Progress Through Quality
Scilab – A Computing Tool for
Engineers
Why are we here?
• To learn about Scilab
– Syntax
– Advantages
– Limitation
• To master programming skills
• To become efficient programmer
19-Oct-13 Scilab - A Computing Tool for Engineers 2
Familiarize
programming tool
Scilab
and
complement our
learning process !
Outline
• What is Scilab ?
• Basics
– Variables, Matrices,
– Std. I/O function
• Linear algebra
• Functions and Subroutines
• Control / Looping statements
• ODE
• File operations and GUI
• Plot Functions
19-Oct-13 Scilab - A Computing Tool for Engineers 3
Scilab
• Computing tool
– Scripts / programming environment
– Mathematical operations
A place where we can compute / calculate !!!
Numerically solve equations
• Free and Open source
http://www.scilab.org
– Free to download
– Lot of help material available over net
http://help.scilab.org/docs/5.4.1/en_US/index.html
19-Oct-13 Scilab - A Computing Tool for Engineers 4
Familiarization
• Version 5.4.1
19-Oct-13 Scilab - A Computing Tool for Engineers 5
Console
Variable
List
Command
History
File
Browser
Basic Operators and Functions
19-Oct-13 Scilab - A Computing Tool for Engineers 6
• Operators : +, -, *, /, ^
• sqrt
• %e
• %i
• %pi
• log
– This is based on “e” -
Natural logarithm
• log10
• Colon “:” operator
• sin cos tan
– sind cosd tand
– asin acos atan
• factorial
• sum
• product
• Relational
– > >= < <= == ~= <>
• Logical
– & | ~
Variables
• No class/type definitions or declarations
19-Oct-13 Scilab - A Computing Tool for Engineers 7
-->a = 3;
-->a
a =
3.
-->a = "Workshop";
-->a
a =
Workshop
Matrices
• Every variable is n dimension in nature
– No need to specify the dimensions / length / size
19-Oct-13 Scilab - A Computing Tool for Engineers 8
h = [ 1 24 -5]
-->h = [1 24 -5]
h =
1. 24. - 5.
-->h = 1;
-->h(1,2) = 24;
-->h(1,3) = - 5;
-->h
h =
1. 24. - 5.
-->h = [1 24];
-->h(1,3) = - 5;
-->h
h =
1. 24. - 5.
Matrices Cont.
19-Oct-13 Scilab - A Computing Tool for Engineers 9
-->x = [2 -3 4; 5 10 24]
x =
2. - 3. 4.
5. 10. 24.
-->x = [2 -3 4];
-->x(2,:) = [5 10 24];
-->x
x =
2. - 3. 4.
5. 10. 24.
-->x(2,:) = [5 10 24];
-->x
x =
0. 0. 0.
5. 10. 24.
-->x(1,:)=[2 -3 4]
x =
2. - 3. 4.
5. 10. 24.
Script Files
• Script file
– .sce
– .sci
 e - executable i – functions
 e – main script files i - for functions or sub-rountines
• “//” comment a statement
– Good programing etiquettes !
• clc
• clear
19-Oct-13 Scilab - A Computing Tool for Engineers 10
Tutorials
19-Oct-13 Scilab - A Computing Tool for Engineers 11
• Tut1: Product of two nos.
• Tut2: Product of two nos. + user input
• Tut3: Matrix calculations based on user
choice
• Tut4: Matrix calculations based on user
choice with condition check
• Tut5: Spline curves
• Tut6: Building blocks
• Tut7: Equation of motion : v
• Tut8: Equation of motion: v and x
• Tut9: Roots of polynomial
• Tut10: Smart Input for Tut4
• Tut11: Write output into text file
• Tut12: Sum on n numbers
• Tut1: Print statements
• Tut2: Input function
• Tut3: Switch case
• Tut4: If then else
• Tut5: Plot functions
• Tut6: Function (Sub routines)
• Tut7: ODE function : I order
• Tut8: Simultaneous ODE : Two I order
• Tut9: Inbuilt function fsolve
• Tut10: GUI
• Tut11: File operations
• Tut12: For looping
Tutorial 1
Multiplication of two numbers (23.4 and 21) and get
their product
• Objective
– General programming structure
clear
clc
different sections in program
– Different options for output (result display on console)
disp
mprintf
Tutorial-1 Script File
19-Oct-13 Scilab - A Computing Tool for Engineers 12
Tutorial 2
Multiplication of two numbers (user input) and get their
product
• Objective
– input function
Obtain user input and then perform computation
 Makes program more generic
 reusable !!
Tutorial-2 Script File
19-Oct-13 Scilab - A Computing Tool for Engineers 13
Tutorial 3
Perform operations on matrix based on user choice
• Objective
– Control statement – “select – case – end”
Obtain two matrices from user
 Perform arithmetic operations on the matrices based on user
choice
– Add two matrix
– Matrix multiplication
– Element wise multiplication
Tutorial-3 Script File
19-Oct-13 Scilab - A Computing Tool for Engineers 14
Tutorial 4
Perform operations on matrix based on user choice
with conditional check
• Objective
– Control statement – “if - then – else - end”
Obtain two matrices from user
 Perform arithmetic operations on the matrices based on user
choice
– Add two matrix / Matrix multiplication / Element wise multiplication
Check whether the user entered value is within bounds / range !!
Tutorial-4 Script File
19-Oct-13 Scilab - A Computing Tool for Engineers 15
Tutorial 5
Plot splines
• Objective
– Plot functions
Generate equi-spaced data (data range)
 Generate splines
– Smooth polynomial
Plot the generated spline to know its nature
Tutorial-5 Script File
19-Oct-13 Scilab - A Computing Tool for Engineers 16
Tutorial 6
Building Block
• Objective
– Use of sub-routines or functions
 Define function once and call it wherever required
 Given dimensions of unit building block how many blocks are
required to build a wall
Tutorial-6 Script File
19-Oct-13 Scilab - A Computing Tool for Engineers 17
Tutorial 7
Equation of motion : Velocity of a moving body under
constant linear acceleration
• Objective
– Solve first order ODE
 Equation of motion for a moving body under constant acceleration
Acceleration “a”
– Constant
– Variable
Tutorial-7 Script File
19-Oct-13 Scilab - A Computing Tool for Engineers 18
0 0
t t u u
 
Tutorial 8
Equation of motion : Velocity and Location of a moving
body under constant linear acceleration
• Objective
– Solve two first order ODE’s
 Equation of motion for a moving body under constant acceleration
Acceleration “a”
– Constant
– Variable
Tutorial-8 Script File
19-Oct-13 Scilab - A Computing Tool for Engineers 19
0 0
t t u u
 
Tutorial 9
Roots of Polynomial
• Objective
– To determine the roots of polynomial
 Find x such that f(x) = 0
 Quadratic equation
– Define f(x)
– Guess a value for xroot such that f (xroot) = 0
– Use in-built function fsolve to determine a actual root
Tutorial-9Script File
19-Oct-13 Scilab - A Computing Tool for Engineers 20
0 0
t t u u
 
2
0 1 2
f (x) a a x a x
  
Tutorial 10
Perform operations on matrix based on user choice
! Obtain data in Smart Way !
• Objective
– Use of simple GUI function to obtain data
Avoids error previously encountered in Tutorial 4 !
Tutorial-10 Script File
19-Oct-13 Scilab - A Computing Tool for Engineers 21
Tutorial 11
Write output data into a file
• Objective
– Use file I/O commands and write result into a file
 Circular cross section pipe of known (given) diameter D
 Fluid of known density ( r ) and viscosity ( m ) flowing at specified
volumetric flow rate
 Compute Reynolds no.
 If Re <= 2100 Flow is laminar
2100 < Re <= 5000 Transition
Re > 5000 Turbulent
Tutorial11-File-operation.sce
19-Oct-13 Scilab - A Computing Tool for Engineers 22
Du
Re
r

m
Tutorial 12
Sum on N numbers
• Objective
– Use looping statement – For loop
 Determine the sum of N numbers
Tutorial12-File-operation.sce
19-Oct-13 Scilab - A Computing Tool for Engineers 23
N
i
i 1
S x

 
To Sum Up
• Scilab as computing tool for engineers
• Basic arithmetic operations
• Computing abilities in Scilab
• Generic programming etiquette
• Use Tutorials and Web documents
• Improvise, learn (re-learn / un-learn)
• Use Scilab to complement your engineering
education
19-Oct-13 Scilab - A Computing Tool for Engineers 24
Gratitude
• CAPE-2013
– For this wonderful opportunity
• PR Team for their registration spree !!
• Technical and Infra support team
• Audience
19-Oct-13 Scilab - A Computing Tool for Engineers 25
19-Oct-13 Scilab - A Computing Tool for Engineers 26
THANK YOU
A person who never made a mistake never tried
anything new
- Albert Einstein
- 1879 -1955
Entities must not be
multiplied beyond necessity
- William of Ockham
- 12th A.D.

More Related Content

What's hot

Scilab for real dummies
Scilab for real dummiesScilab for real dummies
Scilab for real dummies
Sunu Pradana
 
ScilabTEC 2015 - Scilab
ScilabTEC 2015 - ScilabScilabTEC 2015 - Scilab
ScilabTEC 2015 - Scilab
Scilab
 
COMPARATIVE STUDY OF MATLAB AND ITS OPEN SOURCE ALTERNATIVE SCILAB
COMPARATIVE STUDY OF MATLAB AND ITS OPEN SOURCE ALTERNATIVE SCILABCOMPARATIVE STUDY OF MATLAB AND ITS OPEN SOURCE ALTERNATIVE SCILAB
COMPARATIVE STUDY OF MATLAB AND ITS OPEN SOURCE ALTERNATIVE SCILABWildan Maulana
 
Incubating Apache Hivemall
Incubating Apache HivemallIncubating Apache Hivemall
Incubating Apache Hivemall
Makoto Yui
 
Deep Stream Dynamic Graph Analytics with Grapharis - Massimo Perini
Deep Stream Dynamic Graph Analytics with Grapharis -  Massimo PeriniDeep Stream Dynamic Graph Analytics with Grapharis -  Massimo Perini
Deep Stream Dynamic Graph Analytics with Grapharis - Massimo Perini
Flink Forward
 
ScilabTEC 2015 - Embedded Solutions
ScilabTEC 2015 - Embedded SolutionsScilabTEC 2015 - Embedded Solutions
ScilabTEC 2015 - Embedded Solutions
Scilab
 
Mikio Braun – Data flow vs. procedural programming
Mikio Braun – Data flow vs. procedural programming Mikio Braun – Data flow vs. procedural programming
Mikio Braun – Data flow vs. procedural programming
Flink Forward
 
Tech Days 2015: User Presentation Vermont Technical College
Tech Days 2015: User Presentation Vermont Technical CollegeTech Days 2015: User Presentation Vermont Technical College
Tech Days 2015: User Presentation Vermont Technical College
AdaCore
 
SLE2015: Distributed ATL
SLE2015: Distributed ATLSLE2015: Distributed ATL
SLE2015: Distributed ATL
Amine Benelallam
 
Practical Aggregate Programming in Scala
Practical Aggregate Programming in ScalaPractical Aggregate Programming in Scala
Practical Aggregate Programming in Scala
Roberto Casadei
 
Designing a machine learning algorithm for Apache Spark
Designing a machine learning algorithm for Apache SparkDesigning a machine learning algorithm for Apache Spark
Designing a machine learning algorithm for Apache Spark
Marco Gaido
 
Hivemall meets Digdag @Hackertackle 2018-02-17
Hivemall meets Digdag @Hackertackle 2018-02-17Hivemall meets Digdag @Hackertackle 2018-02-17
Hivemall meets Digdag @Hackertackle 2018-02-17
Makoto Yui
 
Nd4 j slides.pptx
Nd4 j slides.pptxNd4 j slides.pptx
Nd4 j slides.pptx
Adam Gibson
 
Nd4 j slides
Nd4 j slidesNd4 j slides
Nd4 j slides
Adam Gibson
 
Automatic ream handling-3rd review 03-04-18
Automatic ream handling-3rd review 03-04-18Automatic ream handling-3rd review 03-04-18
Automatic ream handling-3rd review 03-04-18
Yuv priya
 
Online learning with structured streaming, spark summit brussels 2016
Online learning with structured streaming, spark summit brussels 2016Online learning with structured streaming, spark summit brussels 2016
Online learning with structured streaming, spark summit brussels 2016
Ram Sriharsha
 
SMiLE: Design and Development of an ISS Payload for Liquid Behavior Study in ...
SMiLE: Design and Development of an ISS Payload for Liquid Behavior Study in ...SMiLE: Design and Development of an ISS Payload for Liquid Behavior Study in ...
SMiLE: Design and Development of an ISS Payload for Liquid Behavior Study in ...
Mohamed Elhariry
 
Abstractions and Directives for Adapting Wavefront Algorithms to Future Archi...
Abstractions and Directives for Adapting Wavefront Algorithms to Future Archi...Abstractions and Directives for Adapting Wavefront Algorithms to Future Archi...
Abstractions and Directives for Adapting Wavefront Algorithms to Future Archi...
inside-BigData.com
 
Asymmetry in Large-Scale Graph Analysis, Explained
Asymmetry in Large-Scale Graph Analysis, ExplainedAsymmetry in Large-Scale Graph Analysis, Explained
Asymmetry in Large-Scale Graph Analysis, Explained
Vasia Kalavri
 
Innovative Solar Array Drive Assembly for CubeSat Satellite
Innovative Solar Array Drive Assembly for CubeSat SatelliteInnovative Solar Array Drive Assembly for CubeSat Satellite
Innovative Solar Array Drive Assembly for CubeSat Satellite
Michele Marino
 

What's hot (20)

Scilab for real dummies
Scilab for real dummiesScilab for real dummies
Scilab for real dummies
 
ScilabTEC 2015 - Scilab
ScilabTEC 2015 - ScilabScilabTEC 2015 - Scilab
ScilabTEC 2015 - Scilab
 
COMPARATIVE STUDY OF MATLAB AND ITS OPEN SOURCE ALTERNATIVE SCILAB
COMPARATIVE STUDY OF MATLAB AND ITS OPEN SOURCE ALTERNATIVE SCILABCOMPARATIVE STUDY OF MATLAB AND ITS OPEN SOURCE ALTERNATIVE SCILAB
COMPARATIVE STUDY OF MATLAB AND ITS OPEN SOURCE ALTERNATIVE SCILAB
 
Incubating Apache Hivemall
Incubating Apache HivemallIncubating Apache Hivemall
Incubating Apache Hivemall
 
Deep Stream Dynamic Graph Analytics with Grapharis - Massimo Perini
Deep Stream Dynamic Graph Analytics with Grapharis -  Massimo PeriniDeep Stream Dynamic Graph Analytics with Grapharis -  Massimo Perini
Deep Stream Dynamic Graph Analytics with Grapharis - Massimo Perini
 
ScilabTEC 2015 - Embedded Solutions
ScilabTEC 2015 - Embedded SolutionsScilabTEC 2015 - Embedded Solutions
ScilabTEC 2015 - Embedded Solutions
 
Mikio Braun – Data flow vs. procedural programming
Mikio Braun – Data flow vs. procedural programming Mikio Braun – Data flow vs. procedural programming
Mikio Braun – Data flow vs. procedural programming
 
Tech Days 2015: User Presentation Vermont Technical College
Tech Days 2015: User Presentation Vermont Technical CollegeTech Days 2015: User Presentation Vermont Technical College
Tech Days 2015: User Presentation Vermont Technical College
 
SLE2015: Distributed ATL
SLE2015: Distributed ATLSLE2015: Distributed ATL
SLE2015: Distributed ATL
 
Practical Aggregate Programming in Scala
Practical Aggregate Programming in ScalaPractical Aggregate Programming in Scala
Practical Aggregate Programming in Scala
 
Designing a machine learning algorithm for Apache Spark
Designing a machine learning algorithm for Apache SparkDesigning a machine learning algorithm for Apache Spark
Designing a machine learning algorithm for Apache Spark
 
Hivemall meets Digdag @Hackertackle 2018-02-17
Hivemall meets Digdag @Hackertackle 2018-02-17Hivemall meets Digdag @Hackertackle 2018-02-17
Hivemall meets Digdag @Hackertackle 2018-02-17
 
Nd4 j slides.pptx
Nd4 j slides.pptxNd4 j slides.pptx
Nd4 j slides.pptx
 
Nd4 j slides
Nd4 j slidesNd4 j slides
Nd4 j slides
 
Automatic ream handling-3rd review 03-04-18
Automatic ream handling-3rd review 03-04-18Automatic ream handling-3rd review 03-04-18
Automatic ream handling-3rd review 03-04-18
 
Online learning with structured streaming, spark summit brussels 2016
Online learning with structured streaming, spark summit brussels 2016Online learning with structured streaming, spark summit brussels 2016
Online learning with structured streaming, spark summit brussels 2016
 
SMiLE: Design and Development of an ISS Payload for Liquid Behavior Study in ...
SMiLE: Design and Development of an ISS Payload for Liquid Behavior Study in ...SMiLE: Design and Development of an ISS Payload for Liquid Behavior Study in ...
SMiLE: Design and Development of an ISS Payload for Liquid Behavior Study in ...
 
Abstractions and Directives for Adapting Wavefront Algorithms to Future Archi...
Abstractions and Directives for Adapting Wavefront Algorithms to Future Archi...Abstractions and Directives for Adapting Wavefront Algorithms to Future Archi...
Abstractions and Directives for Adapting Wavefront Algorithms to Future Archi...
 
Asymmetry in Large-Scale Graph Analysis, Explained
Asymmetry in Large-Scale Graph Analysis, ExplainedAsymmetry in Large-Scale Graph Analysis, Explained
Asymmetry in Large-Scale Graph Analysis, Explained
 
Innovative Solar Array Drive Assembly for CubeSat Satellite
Innovative Solar Array Drive Assembly for CubeSat SatelliteInnovative Solar Array Drive Assembly for CubeSat Satellite
Innovative Solar Array Drive Assembly for CubeSat Satellite
 

Similar to Cape2013 scilab-workshop-19Oct13

Apache Spark Performance Troubleshooting at Scale, Challenges, Tools, and Met...
Apache Spark Performance Troubleshooting at Scale, Challenges, Tools, and Met...Apache Spark Performance Troubleshooting at Scale, Challenges, Tools, and Met...
Apache Spark Performance Troubleshooting at Scale, Challenges, Tools, and Met...
Databricks
 
OLAP Basics and Fundamentals by Bharat Kalia
OLAP Basics and Fundamentals by Bharat Kalia OLAP Basics and Fundamentals by Bharat Kalia
OLAP Basics and Fundamentals by Bharat Kalia
Bharat Kalia
 
Computer_Architecture_3rd_Edition_by_Moris_Mano_Ch_09.ppt
Computer_Architecture_3rd_Edition_by_Moris_Mano_Ch_09.pptComputer_Architecture_3rd_Edition_by_Moris_Mano_Ch_09.ppt
Computer_Architecture_3rd_Edition_by_Moris_Mano_Ch_09.ppt
HermellaGashaw
 
Unit 3-pipelining &amp; vector processing
Unit 3-pipelining &amp; vector processingUnit 3-pipelining &amp; vector processing
Unit 3-pipelining &amp; vector processing
vishal choudhary
 
CS304PC:Computer Organization and Architecture Session 33 demo 1 ppt.pdf
CS304PC:Computer Organization and Architecture  Session 33 demo 1 ppt.pdfCS304PC:Computer Organization and Architecture  Session 33 demo 1 ppt.pdf
CS304PC:Computer Organization and Architecture Session 33 demo 1 ppt.pdf
Asst.prof M.Gokilavani
 
Parallel Processing Techniques Pipelining
Parallel Processing Techniques PipeliningParallel Processing Techniques Pipelining
Parallel Processing Techniques Pipelining
RNShukla7
 
Cadancesimulation
CadancesimulationCadancesimulation
Cadancesimulation
Gautham Reddy
 
Track A-2 基於 Spark 的數據分析
Track A-2 基於 Spark 的數據分析Track A-2 基於 Spark 的數據分析
Track A-2 基於 Spark 的數據分析
Etu Solution
 
A Hands-on Intro to Data Science and R Presentation.ppt
A Hands-on Intro to Data Science and R Presentation.pptA Hands-on Intro to Data Science and R Presentation.ppt
A Hands-on Intro to Data Science and R Presentation.ppt
Sanket Shikhar
 
Peddle the Pedal to the Metal
Peddle the Pedal to the MetalPeddle the Pedal to the Metal
Peddle the Pedal to the Metal
C4Media
 
Pitfalls of machine learning in production
Pitfalls of machine learning in productionPitfalls of machine learning in production
Pitfalls of machine learning in production
Antoine Sauray
 
1 Introduction to C Programming.pptx
1 Introduction to C Programming.pptx1 Introduction to C Programming.pptx
1 Introduction to C Programming.pptx
aarockiaabinsAPIICSE
 
Luigi presentation NYC Data Science
Luigi presentation NYC Data ScienceLuigi presentation NYC Data Science
Luigi presentation NYC Data Science
Erik Bernhardsson
 
BTCS501_MM_Ch9.pptx
BTCS501_MM_Ch9.pptxBTCS501_MM_Ch9.pptx
BTCS501_MM_Ch9.pptx
AshokRachapalli1
 
01_intro-cpp.ppt
01_intro-cpp.ppt01_intro-cpp.ppt
01_intro-cpp.ppt
SWETHAABIRAMIM
 
01_intro-cpp.ppt
01_intro-cpp.ppt01_intro-cpp.ppt
01_intro-cpp.ppt
DrBashirMSaad
 
Michael Hall [InfluxData] | Become an InfluxDB Pro in 20 Minutes | InfluxDays...
Michael Hall [InfluxData] | Become an InfluxDB Pro in 20 Minutes | InfluxDays...Michael Hall [InfluxData] | Become an InfluxDB Pro in 20 Minutes | InfluxDays...
Michael Hall [InfluxData] | Become an InfluxDB Pro in 20 Minutes | InfluxDays...
InfluxData
 

Similar to Cape2013 scilab-workshop-19Oct13 (20)

Apache Spark Performance Troubleshooting at Scale, Challenges, Tools, and Met...
Apache Spark Performance Troubleshooting at Scale, Challenges, Tools, and Met...Apache Spark Performance Troubleshooting at Scale, Challenges, Tools, and Met...
Apache Spark Performance Troubleshooting at Scale, Challenges, Tools, and Met...
 
OLAP Basics and Fundamentals by Bharat Kalia
OLAP Basics and Fundamentals by Bharat Kalia OLAP Basics and Fundamentals by Bharat Kalia
OLAP Basics and Fundamentals by Bharat Kalia
 
Computer_Architecture_3rd_Edition_by_Moris_Mano_Ch_09.ppt
Computer_Architecture_3rd_Edition_by_Moris_Mano_Ch_09.pptComputer_Architecture_3rd_Edition_by_Moris_Mano_Ch_09.ppt
Computer_Architecture_3rd_Edition_by_Moris_Mano_Ch_09.ppt
 
Unit 3-pipelining &amp; vector processing
Unit 3-pipelining &amp; vector processingUnit 3-pipelining &amp; vector processing
Unit 3-pipelining &amp; vector processing
 
CS304PC:Computer Organization and Architecture Session 33 demo 1 ppt.pdf
CS304PC:Computer Organization and Architecture  Session 33 demo 1 ppt.pdfCS304PC:Computer Organization and Architecture  Session 33 demo 1 ppt.pdf
CS304PC:Computer Organization and Architecture Session 33 demo 1 ppt.pdf
 
Parallel Processing Techniques Pipelining
Parallel Processing Techniques PipeliningParallel Processing Techniques Pipelining
Parallel Processing Techniques Pipelining
 
Cadancesimulation
CadancesimulationCadancesimulation
Cadancesimulation
 
Track A-2 基於 Spark 的數據分析
Track A-2 基於 Spark 的數據分析Track A-2 基於 Spark 的數據分析
Track A-2 基於 Spark 的數據分析
 
A Hands-on Intro to Data Science and R Presentation.ppt
A Hands-on Intro to Data Science and R Presentation.pptA Hands-on Intro to Data Science and R Presentation.ppt
A Hands-on Intro to Data Science and R Presentation.ppt
 
Peddle the Pedal to the Metal
Peddle the Pedal to the MetalPeddle the Pedal to the Metal
Peddle the Pedal to the Metal
 
Tn6 facility layout
Tn6 facility layoutTn6 facility layout
Tn6 facility layout
 
Tn6 facility+layout
Tn6 facility+layoutTn6 facility+layout
Tn6 facility+layout
 
Pitfalls of machine learning in production
Pitfalls of machine learning in productionPitfalls of machine learning in production
Pitfalls of machine learning in production
 
week15a.pdf
week15a.pdfweek15a.pdf
week15a.pdf
 
1 Introduction to C Programming.pptx
1 Introduction to C Programming.pptx1 Introduction to C Programming.pptx
1 Introduction to C Programming.pptx
 
Luigi presentation NYC Data Science
Luigi presentation NYC Data ScienceLuigi presentation NYC Data Science
Luigi presentation NYC Data Science
 
BTCS501_MM_Ch9.pptx
BTCS501_MM_Ch9.pptxBTCS501_MM_Ch9.pptx
BTCS501_MM_Ch9.pptx
 
01_intro-cpp.ppt
01_intro-cpp.ppt01_intro-cpp.ppt
01_intro-cpp.ppt
 
01_intro-cpp.ppt
01_intro-cpp.ppt01_intro-cpp.ppt
01_intro-cpp.ppt
 
Michael Hall [InfluxData] | Become an InfluxDB Pro in 20 Minutes | InfluxDays...
Michael Hall [InfluxData] | Become an InfluxDB Pro in 20 Minutes | InfluxDays...Michael Hall [InfluxData] | Become an InfluxDB Pro in 20 Minutes | InfluxDays...
Michael Hall [InfluxData] | Become an InfluxDB Pro in 20 Minutes | InfluxDays...
 

Recently uploaded

The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 

Recently uploaded (20)

The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 

Cape2013 scilab-workshop-19Oct13

  • 1. P. R. Naren School of Chemical & Biotechnology (SCBT) prnaren@scbt.sastra.edu at National Conference on Advances in Process Engineering CAPE-2013 SASTRA University Thanjavur, Tamilnadu 613 401 INDIA 19th October 2013 Progress Through Quality Scilab – A Computing Tool for Engineers
  • 2. Why are we here? • To learn about Scilab – Syntax – Advantages – Limitation • To master programming skills • To become efficient programmer 19-Oct-13 Scilab - A Computing Tool for Engineers 2 Familiarize programming tool Scilab and complement our learning process !
  • 3. Outline • What is Scilab ? • Basics – Variables, Matrices, – Std. I/O function • Linear algebra • Functions and Subroutines • Control / Looping statements • ODE • File operations and GUI • Plot Functions 19-Oct-13 Scilab - A Computing Tool for Engineers 3
  • 4. Scilab • Computing tool – Scripts / programming environment – Mathematical operations A place where we can compute / calculate !!! Numerically solve equations • Free and Open source http://www.scilab.org – Free to download – Lot of help material available over net http://help.scilab.org/docs/5.4.1/en_US/index.html 19-Oct-13 Scilab - A Computing Tool for Engineers 4
  • 5. Familiarization • Version 5.4.1 19-Oct-13 Scilab - A Computing Tool for Engineers 5 Console Variable List Command History File Browser
  • 6. Basic Operators and Functions 19-Oct-13 Scilab - A Computing Tool for Engineers 6 • Operators : +, -, *, /, ^ • sqrt • %e • %i • %pi • log – This is based on “e” - Natural logarithm • log10 • Colon “:” operator • sin cos tan – sind cosd tand – asin acos atan • factorial • sum • product • Relational – > >= < <= == ~= <> • Logical – & | ~
  • 7. Variables • No class/type definitions or declarations 19-Oct-13 Scilab - A Computing Tool for Engineers 7 -->a = 3; -->a a = 3. -->a = "Workshop"; -->a a = Workshop
  • 8. Matrices • Every variable is n dimension in nature – No need to specify the dimensions / length / size 19-Oct-13 Scilab - A Computing Tool for Engineers 8 h = [ 1 24 -5] -->h = [1 24 -5] h = 1. 24. - 5. -->h = 1; -->h(1,2) = 24; -->h(1,3) = - 5; -->h h = 1. 24. - 5. -->h = [1 24]; -->h(1,3) = - 5; -->h h = 1. 24. - 5.
  • 9. Matrices Cont. 19-Oct-13 Scilab - A Computing Tool for Engineers 9 -->x = [2 -3 4; 5 10 24] x = 2. - 3. 4. 5. 10. 24. -->x = [2 -3 4]; -->x(2,:) = [5 10 24]; -->x x = 2. - 3. 4. 5. 10. 24. -->x(2,:) = [5 10 24]; -->x x = 0. 0. 0. 5. 10. 24. -->x(1,:)=[2 -3 4] x = 2. - 3. 4. 5. 10. 24.
  • 10. Script Files • Script file – .sce – .sci  e - executable i – functions  e – main script files i - for functions or sub-rountines • “//” comment a statement – Good programing etiquettes ! • clc • clear 19-Oct-13 Scilab - A Computing Tool for Engineers 10
  • 11. Tutorials 19-Oct-13 Scilab - A Computing Tool for Engineers 11 • Tut1: Product of two nos. • Tut2: Product of two nos. + user input • Tut3: Matrix calculations based on user choice • Tut4: Matrix calculations based on user choice with condition check • Tut5: Spline curves • Tut6: Building blocks • Tut7: Equation of motion : v • Tut8: Equation of motion: v and x • Tut9: Roots of polynomial • Tut10: Smart Input for Tut4 • Tut11: Write output into text file • Tut12: Sum on n numbers • Tut1: Print statements • Tut2: Input function • Tut3: Switch case • Tut4: If then else • Tut5: Plot functions • Tut6: Function (Sub routines) • Tut7: ODE function : I order • Tut8: Simultaneous ODE : Two I order • Tut9: Inbuilt function fsolve • Tut10: GUI • Tut11: File operations • Tut12: For looping
  • 12. Tutorial 1 Multiplication of two numbers (23.4 and 21) and get their product • Objective – General programming structure clear clc different sections in program – Different options for output (result display on console) disp mprintf Tutorial-1 Script File 19-Oct-13 Scilab - A Computing Tool for Engineers 12
  • 13. Tutorial 2 Multiplication of two numbers (user input) and get their product • Objective – input function Obtain user input and then perform computation  Makes program more generic  reusable !! Tutorial-2 Script File 19-Oct-13 Scilab - A Computing Tool for Engineers 13
  • 14. Tutorial 3 Perform operations on matrix based on user choice • Objective – Control statement – “select – case – end” Obtain two matrices from user  Perform arithmetic operations on the matrices based on user choice – Add two matrix – Matrix multiplication – Element wise multiplication Tutorial-3 Script File 19-Oct-13 Scilab - A Computing Tool for Engineers 14
  • 15. Tutorial 4 Perform operations on matrix based on user choice with conditional check • Objective – Control statement – “if - then – else - end” Obtain two matrices from user  Perform arithmetic operations on the matrices based on user choice – Add two matrix / Matrix multiplication / Element wise multiplication Check whether the user entered value is within bounds / range !! Tutorial-4 Script File 19-Oct-13 Scilab - A Computing Tool for Engineers 15
  • 16. Tutorial 5 Plot splines • Objective – Plot functions Generate equi-spaced data (data range)  Generate splines – Smooth polynomial Plot the generated spline to know its nature Tutorial-5 Script File 19-Oct-13 Scilab - A Computing Tool for Engineers 16
  • 17. Tutorial 6 Building Block • Objective – Use of sub-routines or functions  Define function once and call it wherever required  Given dimensions of unit building block how many blocks are required to build a wall Tutorial-6 Script File 19-Oct-13 Scilab - A Computing Tool for Engineers 17
  • 18. Tutorial 7 Equation of motion : Velocity of a moving body under constant linear acceleration • Objective – Solve first order ODE  Equation of motion for a moving body under constant acceleration Acceleration “a” – Constant – Variable Tutorial-7 Script File 19-Oct-13 Scilab - A Computing Tool for Engineers 18 0 0 t t u u  
  • 19. Tutorial 8 Equation of motion : Velocity and Location of a moving body under constant linear acceleration • Objective – Solve two first order ODE’s  Equation of motion for a moving body under constant acceleration Acceleration “a” – Constant – Variable Tutorial-8 Script File 19-Oct-13 Scilab - A Computing Tool for Engineers 19 0 0 t t u u  
  • 20. Tutorial 9 Roots of Polynomial • Objective – To determine the roots of polynomial  Find x such that f(x) = 0  Quadratic equation – Define f(x) – Guess a value for xroot such that f (xroot) = 0 – Use in-built function fsolve to determine a actual root Tutorial-9Script File 19-Oct-13 Scilab - A Computing Tool for Engineers 20 0 0 t t u u   2 0 1 2 f (x) a a x a x   
  • 21. Tutorial 10 Perform operations on matrix based on user choice ! Obtain data in Smart Way ! • Objective – Use of simple GUI function to obtain data Avoids error previously encountered in Tutorial 4 ! Tutorial-10 Script File 19-Oct-13 Scilab - A Computing Tool for Engineers 21
  • 22. Tutorial 11 Write output data into a file • Objective – Use file I/O commands and write result into a file  Circular cross section pipe of known (given) diameter D  Fluid of known density ( r ) and viscosity ( m ) flowing at specified volumetric flow rate  Compute Reynolds no.  If Re <= 2100 Flow is laminar 2100 < Re <= 5000 Transition Re > 5000 Turbulent Tutorial11-File-operation.sce 19-Oct-13 Scilab - A Computing Tool for Engineers 22 Du Re r  m
  • 23. Tutorial 12 Sum on N numbers • Objective – Use looping statement – For loop  Determine the sum of N numbers Tutorial12-File-operation.sce 19-Oct-13 Scilab - A Computing Tool for Engineers 23 N i i 1 S x   
  • 24. To Sum Up • Scilab as computing tool for engineers • Basic arithmetic operations • Computing abilities in Scilab • Generic programming etiquette • Use Tutorials and Web documents • Improvise, learn (re-learn / un-learn) • Use Scilab to complement your engineering education 19-Oct-13 Scilab - A Computing Tool for Engineers 24
  • 25. Gratitude • CAPE-2013 – For this wonderful opportunity • PR Team for their registration spree !! • Technical and Infra support team • Audience 19-Oct-13 Scilab - A Computing Tool for Engineers 25
  • 26. 19-Oct-13 Scilab - A Computing Tool for Engineers 26 THANK YOU A person who never made a mistake never tried anything new - Albert Einstein - 1879 -1955 Entities must not be multiplied beyond necessity - William of Ockham - 12th A.D.

Editor's Notes

  1. Console: Simple arithmetic operations can be directly performed on console / Output is displayed on console Command history stores all commands from console ! Variable browser window lists all the variable that are currently in use
  2. Semi-colon “;” is used to suppress printing / display on the command window. For instance, command “a=3” assigns 3 to variable “a” and also displays the output on console In contrast, “a=3;” assigns 3 to variable a but suppress the display on console
  3. Q: How to retrieve the elements of matrix? Extraction of elements from matrix Colon “:” operator