Monday, January 26, 2009

Starting Scilab

The first step for use Scilab is install it.

GNU/Linux users can use the apt-get (apt-get install scilab scilab-bin scilab-doc), Synaptic or compile the codes (from here).

Window$ users can download the installer here.

After install, let's use the Scilab.

This is the initial screen.

Scilab is a interpreted programming language like Python.

The showed screen is the Scilab's prompt, let's do something now.

Write the commands:

--> x = 0;

--> y = 1;

--> z = 2;

Each line declares a variable (x, y and z) and starts it value with 0, 1 and 2, respectively, in float format (in Scilab, all numbers are float, by default).

Let's do operations with the variables now.
-->res1 = x + y - z
res1 =

- 1.

-->res2 = (x + y)*z
res2 =

2.

-->res3 = (-x + y)/z
res3 =

0.5


With the 4 arithmetic operations, we can do any numeric simulation.

In next posts, I'll show what the Scilab can do.

3 comments:

Anonymous said...

Hi, I trying to find how can I insert an entry at scilab like 1/2, and the output is show me exactly 1/2, not the evaluated valor 0.5. In Maxima program, it can be changed setting the numer internal variable to false or true. Thank you!

Anonymous said...

hello,im muszle ...

im looking for a sample coding for PID controller tuning...anybody know how to start typing it?

Anonymous said...

You do not say how to start scilab. Just, 'lets use it...'

HOW to start would really help. I enter, in Slackware 14.2, 'scilab' - nothing. 'which scilab' nothing. No matter what spelling or capitalization - nothing, built with one of Slackware's 'slackbuild's.