Hello World in Scilab

Our first program will print the classic “hello world” message. Here’s the full source code.

disp("hello world");

To run the program, save the code in a file with a .sce extension and then use Scilab to execute it.

$ scilab -f hello-world.sce
hello world

Sometimes we’ll want to build our programs into standalone scripts that can be executed directly. In Scilab, this is straightforward because Scilab scripts can be run directly without any additional build processes.

First, save the script to a file, and then execute it from the command line as shown above.

Now that we can run and build basic Scilab programs, let’s learn more about the language.

Next example: Values.