What is Scilab?
Developed at INRIA, SCILAB has been developed for system control and signal processing applications. It is freely distributed in source code format. The following points will explain the features of SCILAB. It is a similar to MATLAB, which is not freely distributed. It has many features similar to MATLAB.
Scilab is made of three distinct parts:
- An interpreter
- Libraries of functions (Scilab procedures)
- Libraries of Fortran and C routines.
SCILAB has an inherent ability to handle matrices (basic matrix manipulation, concatenation, transpose, inverse etc.,)
Scilab has an open programming environment where the creation of functions and libraries of functions is completely in the hands of the user.
Scilab has an open programming environment where the creation of functions and libraries of functions is completely in the hands of the user
Download Scilab:
http://www.scilab.org/download/index_download.php?page=release#windows
What are the main differences between Scilab and MATLAB?
Functions
Functions in Scilab are NOT Matlab m-files but variables. One or several functions can be defined in a single file (say myfile.sci). The name of of the file is not necessarily related to the the name of the functions. The name of the function(s) is given by
function [y]=fct1(x)
...
function [y]=fct2(x)
...
The function(s) are not automatically loaded into Scilab. Usually you have to execute the command getf("myfile.sci") before using it.
Functions can also be defined on-line (or inside functions) by the command deff.
To execute a script file you must use exec("filename") in Scilab and in Matlab you just need to type the name of the file.
Comment lines
Scilab comments begins with: //
Matlab comments begins with: %
Variables
Predefined variables usually have the % prefix in Scilab (%i, %inf, ...). They are write protected.
Strings
Strings are considered as 1 by 1 matrices of strings in Scilab. Each entry of a string matrix has its own length.
Boolean variables
Boolean variables are %T, %F in Scilab and 0, 1 in Matlab. Indexing with boolean variables may not produce same result. Example x=[1,2];x([1,1]) [which is NOT x([%T,%T])] returns [1,1] in Scilab and [1,2] in Matlab. Also if x is a matrix x(1:n,1)=[] or x(:)=[] is not valid in Matlab.
Polynomials
Polynomials and polynomial matrices are defined by the function poly in Scilab (built-in variables). They are considered as vectors of coefficients in Matlab.
Empty matrices
[ ]+1 returns 1 in Scilab and [ ] in Matlab.
Plotting
Except for the simple plot and mesh (plot3d) functions, Scilab and Matlab are not compatible.
Scicos
Scicos (Scilab) and Simulink (Matlab) are not compatible.
querrymail@gmail.com
0 comments:
Post a Comment