What are the main differences between Scilab and MATLAB?
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 byfunction [y]=fct1(x) ... function [y]=fct2(x) ...
The function(s) are not automatically loaded into Scilab. Usually you have to execute the command before using it.
Functions can also be defined on-line (or inside functions) by the command .
To execute a script file you must use in Scilab and in Matlab you just need to type the name of the file.
Scilab comments begins with:
Matlab comments begins with:
Predefined variables usually have the prefix in Scilab (, , ...). They are write protected.
Strings are considered as 1 by 1 matrices of strings in Scilab. Each entry of a string matrix has its own length.
Boolean variables are , in Scilab and 0, 1 in Matlab. Indexing with boolean variables may not produce same result. Example [which is NOT ] returns in Scilab and in Matlab. Also if is a matrix or is not valid in Matlab.
Polynomials and polynomial matrices are defined by the function in Scilab (built-in variables). They are considered as vectors of coefficients in Matlab.
[ ]+1 returns 1 in Scilab and [ ] in Matlab.
Except for the simple plot and mesh (plot3d) functions, Scilab and Matlab are not compatible
Scicos (Scilab) and Simulink (Matlab) are not compatible.
Most built in functions are identical in Matlab and Scilab. Some of them have a slightly different syntax. Here is a brief, partial list of commands with significant different syntax.
Matlab Scilab "equivalent"
delete unix('rm file')
eig spec or bdiag
exist exists + type
feval evstr and strcat
finite (x < %inf)
isinf(a) a == %inf
isnan(a) a ~= a
isstr(a) type(a) == 10
keyboard pause + resume
strcmp(a,b) a == b
- Is obsession something scary
- Why dont some people express their emotions
- Which countries colonized Indonesia
- What positive qualities do entrepreneurs exhibit
- What are some movies similar to Shooter
- What if Nintendo made a phone
- How were Victorian houses built
- Why do we make a class virtual
- What is your home life like
- How can our mindsets be improved
- How do I build a mobile app
- How important are experiences in life
- How is sunlight formed
- Do hedgehogs get along with cats
- What are the disadvantages of BDD
- Can anybody become a screenwriter
- What does give a hard ride mean