Difference between revisions of "Scilab"
(→Advanced Level Scilab) |
PoojaMoolya (Talk | contribs) |
||
(33 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
− | + | ||
− | + | '''Scilab''' (http://scilab.org, http://scilab.in) is an open source scientific software package for numerical computations. It has an extremely reliable and efficiently coded numerical library. It is also a high productivity tool: Through its interpreted language, 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. | |
− | Scilab (http://scilab.org, http://scilab.in | + | |
Scilab runs on all popular operating systems. Since 1994, it has been distributed freely along with the source code via the Internet. It is useful for students at school, college and <span class="plainlinks">[http://www.netlook.com.br/ <span style="color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;">roupas da moda</span>] research level. It is also useful for researchers and professionals. | Scilab runs on all popular operating systems. Since 1994, it has been distributed freely along with the source code via the Internet. It is useful for students at school, college and <span class="plainlinks">[http://www.netlook.com.br/ <span style="color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;">roupas da moda</span>] research level. It is also useful for researchers and professionals. | ||
− | IIT Bombay is leading the effort to popularise Scilab in India. This is part of the Free and Open source Software for Science and Engineering Education (FOSSEE) project, supported by the National Mission on Education through ICT of MHRD | + | IIT Bombay is leading the effort to popularise Scilab in India. This is part of the Free and Open source Software for Science and Engineering Education (FOSSEE) project, supported by the National Mission on Education through ICT of MHRD. |
IIT Bombay is using Spoken Tutorials (http://spoken-tutorial.org) to create learning material for FOSS. This is the main page for the organisation of the scripts required for Scilab spoken tutorials. We invite the Scilab user community to participate in this activity. | IIT Bombay is using Spoken Tutorials (http://spoken-tutorial.org) to create learning material for FOSS. This is the main page for the organisation of the scripts required for Scilab spoken tutorials. We invite the Scilab user community to participate in this activity. | ||
+ | '''Learners''': All Science and Engineering Students. | ||
+ | |||
+ | |||
+ | |||
+ | <blockquote style="background-color: lemonchiffon; border: solid thin grey;"> | ||
+ | The Spoken Tutorial Effort for Scilab is being contributed by Shalini Shrivastava, Rupak Rokade, Anuradha Amruthkar, Manas Ranjan Das, Mukul Kulkarni, Shamika Mohanan, Lavitha Pereira from IIT Bombay. | ||
+ | |||
+ | </blockquote> | ||
__TOC__ | __TOC__ | ||
Line 16: | Line 23: | ||
=General Information= | =General Information= | ||
This topic will include all functionality in Scilab that <span class="plainlinks">[http://thebeginnerslens.com/ <span style="color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;">iphone photography</span>] is not domain specific- functionality that is required across several domains. | This topic will include all functionality in Scilab that <span class="plainlinks">[http://thebeginnerslens.com/ <span style="color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;">iphone photography</span>] is not domain specific- functionality that is required across several domains. | ||
− | |||
− | |||
==Basic Level Introduction to Scilab== | ==Basic Level Introduction to Scilab== | ||
This level will include a set of tutorials that are required to be known in order to qualify as "Scilab Literate". The tutorials here will teach programming <span class="plainlinks">[http://www.bestpills4weightloss.com/ <span style="color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;">weight loss pills</span>] | This level will include a set of tutorials that are required to be known in order to qualify as "Scilab Literate". The tutorials here will teach programming <span class="plainlinks">[http://www.bestpills4weightloss.com/ <span style="color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;">weight loss pills</span>] | ||
fundamentals and the most commonly used Scilab functionality- Matrix operations and Plotting. | fundamentals and the most commonly used Scilab functionality- Matrix operations and Plotting. | ||
− | # Installing | + | # ''' Why Scilab''' |
− | #* Show where to download from and how to decide which version to choose | + | #*Capabilities of the Scilab package |
− | #* Windows installation | + | #* Benefits of shifting to Scilab. |
+ | # '''Installing''' | ||
+ | #* Show where to download from and how to decide which version to choose | ||
+ | #* Windows installation | ||
#* Linux installation (using package manager- show only Debian/Ubuntu as example (sudo apt-get install scilab) as well as generic binary) | #* Linux installation (using package manager- show only Debian/Ubuntu as example (sudo apt-get install scilab) as well as generic binary) | ||
#* Mac | #* Mac | ||
#* Compilation from source can come as a part of a more advanced tutorial | #* Compilation from source can come as a part of a more advanced tutorial | ||
− | # Getting Started | + | # '''Getting Started''' |
− | #* Expressions: Show mathematical expressions with numbers | + | #* Expressions: Show mathematical expressions with numbers |
− | #* Variables | + | #* Variables |
− | #* Diary | + | #* Diary command |
− | #* Define symbolic constants | + | #* Define symbolic constants. |
− | #* Basic functions | + | #* Basic functions |
#* suppressing output(;) | #* suppressing output(;) | ||
#* help,clc | #* help,clc | ||
− | # | + | #'''Vector Operations''' |
− | + | #*Define vector | |
− | + | #*Calculate length of a vector. | |
− | #* Define | + | #*Perform mathematical operations on Vectors such as addition,subtraction and multiplication. |
− | #* | + | #*Define a matrix. |
− | #* | + | #*Calculate size of a matrix. |
− | #* Define | + | #*Perform mathematical operations on Matrices such as addition, subtraction and multiplication. |
− | #* size | + | #'''Matrix Operations''' |
− | # Matrix Operations | + | #*Access the elements of Matrix |
− | #* | + | #*Determine the determinant, inverse and eigen values of a matrix. |
− | #* | + | #*Define special matrices. |
− | + | #*Perform elementary row operations. | |
− | #* | + | #*Solve the system of linear equations. |
− | + | #''' Conditional Branching''' | |
− | #* | + | #*'if' and 'then' with the example |
− | #* | + | #*use of the 'else' keyword |
− | + | #*use of the 'elseif' keyword | |
− | # Conditional Branching | + | #*example for select |
− | #* | + | #''' Iteration''' |
− | + | #* Explain syntax of 'for' statement- tell that the variable iterates over a list/vector/matrix (or an expression that evaluates to any of these). | |
− | #* | + | |
− | #* | + | |
− | #* | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | #* Explain syntax of 'for' statement- tell that the variable iterates over a list/vector/matrix (or an expression that evaluates to any of these). | + | |
#* Give example: for i = 1:5, disp (i), end | #* Give example: for i = 1:5, disp (i), end | ||
#* Then explain break condition. Use example: for i = 1:10, disp(i), if (i==5), break, end, end | #* Then explain break condition. Use example: for i = 1:10, disp(i), if (i==5), break, end, end | ||
#* Then explain continue condition. Use example: for i = 1:10, if (i<=5) then continue, else disp(i), end, end | #* Then explain continue condition. Use example: for i = 1:10, if (i<=5) then continue, else disp(i), end, end | ||
− | #* Explain while condition. | + | #* Explain while condition. |
− | #* Give example: i = 0; while(i <=5), i = i + 1; | + | #* Give example: i = 0; while(i <=5), i = i + 1; d |
− | #* | + | # '''Scripts and Functions''' |
− | # | + | #*Introduction to the file formats in Scilab. |
+ | #*SCRIPT files. | ||
+ | #*sce versus .sci | ||
+ | #*Inline functions. | ||
+ | # ''' Plotting 2D graphs''' | ||
#* About linspace: linspace is a linearly spaced vector. | #* About linspace: linspace is a linearly spaced vector. | ||
#* Plot a simple graph: x=linspace(12,34,10), y=linspace(-.1,2,10), plot(x,y) | #* Plot a simple graph: x=linspace(12,34,10), y=linspace(-.1,2,10), plot(x,y) | ||
− | #* plot2d | + | #* plot2d |
− | #* | + | #* Use of "clf()". |
− | + | #* Configure the title for the plot | |
− | #* Configure the title for the plot | + | #* Configure a legend |
− | #* Configure a legend | + | |
#* Divide a graphic window into a matrix of sub-windows using subplot(mnp) | #* Divide a graphic window into a matrix of sub-windows using subplot(mnp) | ||
− | # | + | #''' Xcos introduction''' |
− | #* | + | #*What is XCOS. |
− | #* | + | #*What is palette. |
− | + | #*To collect the blocks from the palette and connect them to construct the block diagram. | |
− | #* | + | #*Set the parameters of diﬀerent blocks. |
− | #* | + | #*To setup the simulation parameters. |
− | #* | + | #*Simulate the constructed block diagram. |
− | #* | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
==Advanced Level Scilab== | ==Advanced Level Scilab== | ||
− | # File Handling- Scilab File handling | + | # '''File Handling- Scilab File handling''' |
#* Writing to a file using write() | #* Writing to a file using write() | ||
#* Reading from a file using read() | #* Reading from a file using read() | ||
#* Opening an existing file using mopen() | #* Opening an existing file using mopen() | ||
#* Closing an already opened file using mclose() | #* Closing an already opened file using mclose() | ||
− | # File Handling- User Defined Input and Output in Scilab | + | # '''File Handling- User Defined Input and Output in Scilab''' |
#* Input Function | #* Input Function | ||
#* mprintf() | #* mprintf() | ||
#* save() and load() | #* save() and load() | ||
#* Used to quit scilab midway through calculation and continue at later stage | #* Used to quit scilab midway through calculation and continue at later stage | ||
− | # Numerical methods- Integration | + | # '''Numerical methods- Integration''' |
− | # Numerical methods- Solving Non- linear Equations | + | #* Develop Scilab code for different Composite Numerical Integration algorithms |
− | # Numerical methods- Gauss Elimination | + | #* Divide the integral into equal intervals |
− | # Numerical methods- Iterative Methods | + | #* Apply the algorithm to each interval |
− | # Numerical methods- Interpolation | + | #* Calculate the composite value of the integral |
− | # Numerical methods- ODE- Euler methods | + | # '''Numerical methods- Solving Non- linear Equations''' |
− | # Numerical methods- ODE- Applications | + | #*Learn how to solve nonlinear equations using numerical methods |
− | # Optimization Using Karmarkar Functions | + | #*Learn Bisection method |
+ | #*Learn Secant method | ||
+ | #*Learn how to develop Scilab code for solving nonlinear equations | ||
+ | # '''Numerical methods- Gaussian Methods''' | ||
+ | #* Explain Gauss Elimination method algorithm | ||
+ | #* Explain code for Gauss Elimination method and solve an example using this code | ||
+ | #* Explain Gauss Jordan method algorithm | ||
+ | #* Explain code for Gauss Jordan method and solve an example using this code | ||
+ | # '''Numerical methods- Iterative Methods''' | ||
+ | #*Solve system of linear equations using iterative methods | ||
+ | #*Use Jacobi and Gauss Seidel iterative methods | ||
+ | #*Learn how to iterate until we converge at the solution | ||
+ | #*Learn how Gauss Seidel method is faster than Jacobi method | ||
+ | #*Develop Scilab code for these two methods to solve linear equations | ||
+ | #'''Numerical methods- Interpolation''' | ||
+ | #*Develop Scilab code for different Numerical Interpolation algorithms | ||
+ | #*Calculate new value of function from given data points | ||
+ | # '''Numerical methods- ODE- Euler methods''' | ||
+ | #*Solve ODEs using Euler and Modified Euler methods | ||
+ | #*Develop Scilab code to solve ODEs | ||
+ | # '''Numerical methods- ODE- Applications''' | ||
+ | #*Use Scilab ode function | ||
+ | #*Solve typical examples of ODEs | ||
+ | #*Plot the solution | ||
+ | #*examples Motion of simple pendulum Van der Pol equation | ||
+ | #*Lorenz system | ||
+ | # ''' Optimization Using Karmarkar Functions''' | ||
#* About Optimization | #* About Optimization | ||
#* Use of Scilab function Karmarkar in Optimization | #* Use of Scilab function Karmarkar in Optimization | ||
− | # | + | #'''Digital Signal Processing''' |
− | + | #* Plotting continuous and discrete sine wave. | |
− | # | + | #* Plotting step function. |
− | # | + | #* Plotting ramp function. |
− | # | + | # '''Control systems''' |
− | + | #*Define a continuous time system: second and higher order | |
− | # Control systems | + | #*Response plot for step input |
− | # Discrete systems | + | #*Response plot for sine input |
− | # Calling User Defined Functions in XCOS | + | #*Bode plot |
+ | #*Study numer and denom Scilab functions | ||
+ | #*Plot poles and zeros of function | ||
+ | # '''Discrete systems''' | ||
+ | #*Define discrete time system variable z | ||
+ | #*Define first order discrete time system | ||
+ | #*Explain ones, flts, dscr, ss2tf functions | ||
+ | # '''Calling User Defined Functions in XCOS''' | ||
#* Write a squaring function | #* Write a squaring function | ||
#* Use of scifunc block in XCOS | #* Use of scifunc block in XCOS | ||
#* Use of MUX block | #* Use of MUX block | ||
#* Call functions having multiple inputs and output | #* Call functions having multiple inputs and output | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Latest revision as of 12:25, 6 May 2019
Scilab (http://scilab.org, http://scilab.in) is an open source scientific software package for numerical computations. It has an extremely reliable and efficiently coded numerical library. It is also a high productivity tool: Through its interpreted language, 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.
Scilab runs on all popular operating systems. Since 1994, it has been distributed freely along with the source code via the Internet. It is useful for students at school, college and roupas da moda research level. It is also useful for researchers and professionals.
IIT Bombay is leading the effort to popularise Scilab in India. This is part of the Free and Open source Software for Science and Engineering Education (FOSSEE) project, supported by the National Mission on Education through ICT of MHRD.
IIT Bombay is using Spoken Tutorials (http://spoken-tutorial.org) to create learning material for FOSS. This is the main page for the organisation of the scripts required for Scilab spoken tutorials. We invite the Scilab user community to participate in this activity.
Learners: All Science and Engineering Students.
The Spoken Tutorial Effort for Scilab is being contributed by Shalini Shrivastava, Rupak Rokade, Anuradha Amruthkar, Manas Ranjan Das, Mukul Kulkarni, Shamika Mohanan, Lavitha Pereira from IIT Bombay.
Note: Each numbered topic corresponds to a single spoken tutorial. Each bulleted point corresponds to a command or topic that must be covered organic nuts in the given spoken tutorial.
General Information
This topic will include all functionality in Scilab that iphone photography is not domain specific- functionality that is required across several domains.
Basic Level Introduction to Scilab
This level will include a set of tutorials that are required to be known in order to qualify as "Scilab Literate". The tutorials here will teach programming weight loss pills fundamentals and the most commonly used Scilab functionality- Matrix operations and Plotting.
- Why Scilab
- Capabilities of the Scilab package
- Benefits of shifting to Scilab.
- Installing
- Show where to download from and how to decide which version to choose
- Windows installation
- Linux installation (using package manager- show only Debian/Ubuntu as example (sudo apt-get install scilab) as well as generic binary)
- Mac
- Compilation from source can come as a part of a more advanced tutorial
- Getting Started
- Expressions: Show mathematical expressions with numbers
- Variables
- Diary command
- Define symbolic constants.
- Basic functions
- suppressing output(;)
- help,clc
- Vector Operations
- Define vector
- Calculate length of a vector.
- Perform mathematical operations on Vectors such as addition,subtraction and multiplication.
- Define a matrix.
- Calculate size of a matrix.
- Perform mathematical operations on Matrices such as addition, subtraction and multiplication.
- Matrix Operations
- Access the elements of Matrix
- Determine the determinant, inverse and eigen values of a matrix.
- Define special matrices.
- Perform elementary row operations.
- Solve the system of linear equations.
- Conditional Branching
- 'if' and 'then' with the example
- use of the 'else' keyword
- use of the 'elseif' keyword
- example for select
- Iteration
- Explain syntax of 'for' statement- tell that the variable iterates over a list/vector/matrix (or an expression that evaluates to any of these).
- Give example: for i = 1:5, disp (i), end
- Then explain break condition. Use example: for i = 1:10, disp(i), if (i==5), break, end, end
- Then explain continue condition. Use example: for i = 1:10, if (i<=5) then continue, else disp(i), end, end
- Explain while condition.
- Give example: i = 0; while(i <=5), i = i + 1; d
- Scripts and Functions
- Introduction to the file formats in Scilab.
- SCRIPT files.
- sce versus .sci
- Inline functions.
- Plotting 2D graphs
- About linspace: linspace is a linearly spaced vector.
- Plot a simple graph: x=linspace(12,34,10), y=linspace(-.1,2,10), plot(x,y)
- plot2d
- Use of "clf()".
- Configure the title for the plot
- Configure a legend
- Divide a graphic window into a matrix of sub-windows using subplot(mnp)
- Xcos introduction
- What is XCOS.
- What is palette.
- To collect the blocks from the palette and connect them to construct the block diagram.
- Set the parameters of diﬀerent blocks.
- To setup the simulation parameters.
- Simulate the constructed block diagram.
Advanced Level Scilab
- File Handling- Scilab File handling
- Writing to a file using write()
- Reading from a file using read()
- Opening an existing file using mopen()
- Closing an already opened file using mclose()
- File Handling- User Defined Input and Output in Scilab
- Input Function
- mprintf()
- save() and load()
- Used to quit scilab midway through calculation and continue at later stage
- Numerical methods- Integration
- Develop Scilab code for different Composite Numerical Integration algorithms
- Divide the integral into equal intervals
- Apply the algorithm to each interval
- Calculate the composite value of the integral
- Numerical methods- Solving Non- linear Equations
- Learn how to solve nonlinear equations using numerical methods
- Learn Bisection method
- Learn Secant method
- Learn how to develop Scilab code for solving nonlinear equations
- Numerical methods- Gaussian Methods
- Explain Gauss Elimination method algorithm
- Explain code for Gauss Elimination method and solve an example using this code
- Explain Gauss Jordan method algorithm
- Explain code for Gauss Jordan method and solve an example using this code
- Numerical methods- Iterative Methods
- Solve system of linear equations using iterative methods
- Use Jacobi and Gauss Seidel iterative methods
- Learn how to iterate until we converge at the solution
- Learn how Gauss Seidel method is faster than Jacobi method
- Develop Scilab code for these two methods to solve linear equations
- Numerical methods- Interpolation
- Develop Scilab code for different Numerical Interpolation algorithms
- Calculate new value of function from given data points
- Numerical methods- ODE- Euler methods
- Solve ODEs using Euler and Modified Euler methods
- Develop Scilab code to solve ODEs
- Numerical methods- ODE- Applications
- Use Scilab ode function
- Solve typical examples of ODEs
- Plot the solution
- examples Motion of simple pendulum Van der Pol equation
- Lorenz system
- Optimization Using Karmarkar Functions
- About Optimization
- Use of Scilab function Karmarkar in Optimization
- Digital Signal Processing
- Plotting continuous and discrete sine wave.
- Plotting step function.
- Plotting ramp function.
- Control systems
- Define a continuous time system: second and higher order
- Response plot for step input
- Response plot for sine input
- Bode plot
- Study numer and denom Scilab functions
- Plot poles and zeros of function
- Discrete systems
- Define discrete time system variable z
- Define first order discrete time system
- Explain ones, flts, dscr, ss2tf functions
- Calling User Defined Functions in XCOS
- Write a squaring function
- Use of scifunc block in XCOS
- Use of MUX block
- Call functions having multiple inputs and output
Contributors and Content Editors
Lavitha Pereira, Minal, Nancyvarkey, PoojaMoolya, Pratik kamble