Scilab Manual

Topics: Control theory, Bode plot, Nyquist plot Pages: 9 (1385 words) Published: April 16, 2013
What Is Scilab?

There exist two categories of general scientific software: computer algebra systems that perform symbolic computations, and general purpose numerical systems performing numerical computations and designed specifically for scientific applications. The best-known examples in the first category are Maple, Mathematica, Maxima, Axiom, and MuPad. The second category represents a larger market dominated by MATLAB. Scilab belongs to this second category. Scilab is an interpreted language with dynamically typed objects. Scilab can be used as a scripting language to test algorithms or to perform numerical computations. But it is also a programming language, and the standard Scilab library contains around 2000 Scilab coded functions. The Scilab syntax is simple, and the use of matrices, which are the fundamental object of scientific calculus, is facilitated through specific functions and operators. These matrices can be of different types including real, complex, string, polynomial, and rational. Scilab programs are thus quite compact and most of the time are smaller than their equivalents in C, C++, or Java. Scilab is mainly dedicated to scientific computing, and it provides easy access to large numerical libraries from such areas as linear algebra, numerical integration, and optimization. It is also simple to extend the Scilab environment. One can easily import new functionalities from external libraries into Scilab by using static or dynamic links. It is also possible to define new data types using Scilab structures and to overload standard operators for new data types. Numerous toolboxes that add specialized functions to Scilab are available on the official site. Scilab also provides many visualization functionalities including 2D, 3D, contour and parametric plots, and animation. Graphics can be exported in various formats such as Gif, Postscript, Postscript-Latex, and Xfig. In addition to Scilab’s user interface functions, the Scilab Tcl/Tk interface can be used to develop sophisticated GUI’s (Graphical user interfaces). Scilab contains the collection of large number of files.

These files include
• Elementary functions of scientific calculation;
• Linear algebra, sparse matrices;
• Polynomials and rational functions;
• Classic and robust control, LMI optimization;
• Nonlinear methods (optimization, ODE and DAE solvers, Scicos, which is a hybrid dynamic systems modeler and simulator);
• Signal processing;
• Random sampling and statistics;
• Graphs (algorithms, visualization);
• Graphics, animation;
• Parallelism using PVM;
• MATLAB-to-Scilab translator;
• A large number of contributions for various areas.

Statement 1: Calculation on polynomials.

Scilab program:
x = poly(0,'x');//initialize the polynomial variable x
a = [x,2*x;x^2,x+3]; // polynomial matrix
det(a) // determinant
inv(a) // inverse of a
roots(x^2-3*x+4) // roots of the polynomial equation
// another way to define a polynomial
v = [2 4 5]
p = poly(v,'x','coeff')
q = poly([1 -2 3],'x','c')

Output on Scilab Console:
-->x = poly(0,'x');
-->a = [x,2*x;x^2,x+3];
ans =
2 3
3x + x - 2x
ans =
3 + x - 2
----------- ---------
2 3 2
3x + x - 2x 3 + x - 2x

- x 1
--------- ---------
2 2
3 + x - 2x 3 + x - 2x
ans =
1.5 + 1.3228757i
1.5 - 1.3228757i
-->// another way to define a polynomial
-->v = [2 4 5]
v =
2. 4. 5.
-->p = poly(v,'x','coeff')
p =
2 + 4x + 5x
-->q = poly([1 -2 3],'x','c')
q =
1 - 2x + 3x
-->clf();//clears the graphic window
-->xclear();//clear one or more windows
Statement2: Representation in the form of matrix and determining...
Continue Reading

Please join StudyMode to read the full document

You May Also Find These Documents Helpful

  • Manual Testing Essay
  • Manual Transmission Essay
  • How to Drive Manual Car Essay
  • Process Description of a Manual Transmission Essay
  • System: Manual Transmission and Inventory Control Section Essay
  • How to Essay (Stick Shift / Manual Transmission)
  • Manual Essay
  • Essay on Manual Transmission

Become a StudyMode Member

Sign Up - It's Free