Scilab Command Line
Scilab's interactive console serves as the platform's command line environment, designed with a REPL (Read-Eval-Print Loop) methodology, which is similar to the one used in Matlab.
In essence, the REPL workflow means that every time a command is typed into the command line, Scilab reads and executes the command, subsequently displaying the output before preparing itself for the next command. This setup facilitates a user-friendly experience where code can be written, executed, and the results can be viewed instantaneously.
To distinguish itself from other similar platforms like MATLAB or Octave, Scilab uses the symbol "-->" as a prompt within its interactive environment.
-->
Here's a straightforward example
Imagine you want to find the square root of a number, let's say 9. You would type the command sqrt(9) and press enter.
--> sqrt(9)
Scilab would then process the sqrt(9) command and print the result on the console.
ans = 3.
This indicates that the square root of 9 is 3.
The result of this most recent command is conveniently stored in a temporary variable, "ans", an abbreviation for "answer".
Moreover, Scilab provides a plethora of tools for efficiency and ease of use.
This includes features such as a command history, autocomplete functionality that can be activated using the Tab key, keyboard shortcuts, and accessible help documentation.
For instance, if you're looking for commands related to the sine function, you could type "sin" into the command line and hit the Tab key.
Scilab will then display a list of commands starting with "sin".
Additionally, Scilab's built-in help() function enables users to easily access the platform's documentation.
By typing help() and placing the desired command name within the brackets - let's use "ver" as an example - you will get the documentation for that command.
--> help("ver")
Scilab then provides the specific documentation.
Should you wish to clear the command screen, simply input the clc command.
--> clc
Furthermore, specifying a number within brackets will clear that exact number of lines: clc(n).
For example, the command clc(3) will erase only the last three lines from the console.
--> clc(3)