Difference between revisions of "Scilab"
(→Advanced Level Scilab) |
(→Advanced Level Scilab) |
||
Line 105: | Line 105: | ||
#* Explain code for Gauss Jordan method and solve an example using this code | #* Explain code for Gauss Jordan method and solve an example using this code | ||
# '''Numerical methods- Iterative Methods''' | # '''Numerical methods- Iterative Methods''' | ||
+ | #*Solve system of linear equations using iterative methods | ||
+ | #*Develop Scilab code to solve linear equations | ||
# '''Numerical methods- Interpolation''' | # '''Numerical methods- Interpolation''' | ||
# '''Numerical methods- ODE- Euler methods''' | # '''Numerical methods- ODE- Euler methods''' |
Revision as of 10:12, 18 December 2013
Template:Spoken Tutorial Banner
Scilab (http://scilab.org, http://scilab.in, http://scilab.cn) 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 (http://spoken-tutorial.org/NMEICT-Intro).
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.
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
- 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
- Matrix Operations
- Square matrices
- det(Q), diag(Q)
- Matrix generation: zeros(3,4), ones(2,5), eye(4,4), diag([1 2 3]), rand(2,3).
- Ranges: 1:4, 2:2:8, linspace(1, 9, 5) (linspace is to be explained in Plotting 2D graphs tutorial)
- Elementary row operations
- Solving equations
- Scripts and Functions
- Explain that one often repeats a set of commands- in which case it is helpful to save that set of commands for future or repeated use. The commands can be saved as scripts or functions.
- Change directory to the desktop. Open the scilab editor and type the commands (each on a new line)
- Save the above file to the desktop. Then open the same file using a regular text editor such as notepad to show that it is indeed a text file. Now load the file into scilab using the scilab editor's execute menu option.
- Change the value of a to 5 in the editor, save and close it. Now execute the script directly from the scilab interpreter using exec.
- Functions: Show the syntax of functions, explain the function keyword, input arguments and the structure of output arguments when there is more than one argument.
- Show the following function in the editor: .
- Inline functions.
- .sce versus .sci: These are just conventions.
- Conditional Branching
- Explain booleans
- First explain 'if' and 'then' with the example
- Now explain the use of the 'else' keyword
- Now explain the use of the 'elseif' keyword
- Say that if there are several branches, it may be clearer to use the 'select' keyword.
- Give example for select
- Branching can be based on satisfaction of combination of multiple conditions as well
- Iteration
- Explain syntax of 'for' statement- tell that the variable iterates over a list/vector/matrix
- Break condition.
- continue condition.
- while condition.
- break, continue condition with example in while loop.
- 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
- Using clf() clear the graphic window.
- Configure the title for the plot
- Configure a legend
- Divide a graphic window into a matrix of sub-windows using subplot(mnp)
- Xcos introduction
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
- 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
- Develop Scilab code to solve linear equations
- Numerical methods- Interpolation
- Numerical methods- ODE- Euler methods
- Numerical methods- ODE- Applications
- Optimization Using Karmarkar Functions
- About Optimization
- Use of Scilab function Karmarkar in Optimization
- Optimization of Non-linear Functions
- Digital Signal Processing
- Plotting continuous and discrete sine wave.
- Plotting step function.
- Plotting ramp function.
- Filter Design- Windowing Techniques
- Filter Design- Window Based FIR Filter
- Filter Design- IIR Digital Filter
- Filter Design- Applying Digital Filter
- Control systems
- Discrete systems
- 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