#Tc1017 #SciLab
SciLab is a numerical computation software which is quite handy and also easier to understand than C++ in my opinion, its graphic options are very useful as well, and the handling of matices is definitely more intuitive than in C++.
Understanding SciLab:
- On the console screen, we can use the arrows to change instructions and find the history of used commands, kinda like how we use the arrow keys in the compiler.
- When using the console we have to input first –> before any command
- Basic operations and inserting comments remain the same as in C++.
- We can use %e, %pi and %i to represent euler’s constant, pie and complex numbers.
- The semicolon is used to avoid any result from beign displayed, no compiling error will occur here.
- More useful than the console screen is the editor, which is basically a word processor in which coding becomes easier.
Plotting in SciLab:
- Command: plot.
- clf menas clear plot, while scf opens another window.
- Colors can be added to curves: letter enclosed by “” –> “b” makes blue
- Point styles work the same
- Segments go in square brackets, point go in round ones.
- Statistics: useful for creating bar graphs
- Use bar command –> bar (x,n,color)
Creating functions:
- Begin: function
- End: endfunction
- Variables must always have a value, but we don´t have to declare them in advanced😀
- Function’s parameters work the same as in C++
- Logical operators remain the same, only != becomes <>
Matrices and vectors:
- Al operations are done with matrices.
- A space or coma separates columns.
- Semicolons separate rows.
Loops:
- Beggining:step: value –> this way is much simpler than C++
- For and while finish with an end.
WSQ14: SciLab by diegodamy is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.