Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
College aantekeningen

Class notes 15cs101L (Scilab)

Beoordeling
-
Verkocht
-
Pagina's
66
Geüpload op
27-11-2022
Geschreven in
2016/2017

Scilab is a free and open-source, cross-platform numerical computational package and a high-level, numerically oriented programming language. It can be used for signal processing, statistical analysis, image enhancement, fluid dynamics simulations, numerical optimization, and modelling, simulation of explicit and implicit dynamical systems and (if the corresponding toolbox is installed) symbolic manipulations here in this document, you get access to the notes and experiments on Scilab and its functioning for your understanding so that you can excel in the subject

Meer zien Lees minder
Instelling
Vak

Voorbeeld van de inhoud

STUDY EXPERIMENT – 1

SCILAB WORKING ENVIRONMENT

SCILAB CONSOLE




Scilab Working Envionment

The first way is to use Scilab interactively, by typing commands in the console, analyzing the results
and continuing this process until the final result is computed. This document is designed so that the Scilab
examples which are printed here can be copied into the console. The goal is that the reader can experiment
by himself Scilab behavior. This is indeed a good way of understanding the behavior of the program and,
most of the time, it allows a quick and smooth way of performing the desired computation.
In the following example, the function disp is used in the interactive mode to print out the string ”Hello
World!”.
1

, The completion in the console.

-->s="Hello World!" s =
Hello World! -->disp(s)
Hello World!
In the previous session, we did not type the characters ”-->”which is the prompt, and which is managed
by Scilab. We only type the statement s="Hello World!" with our keyboard and then hit the <Enter> key.
Scilab answer is s = and Hello World!. Then we type disp(s) and Scilab answer is Hello World!.
When we edit a command, we can use the keyboard, as with a regular editor. We can use the left ← and
right → arrows in order to move the cursor on the line and use the <Backspace>and <Suppr>keys in order
to fix errors in the text.
In order to get access to previously executed commands, use the up arrow ↑ key. This allows to browse
the previous commands by using the up ↑ and down ↓ arrow keys.
The <Tab>key provides a very convenient completion feature. In the following session, we type the
statement disp in the console.
-->disp
Then we can type on the <Tab>key, which makes a list appear in the console, as presented in figure 4.
Scilab displays a listbox, where items correspond to all functions which begin with the letters ”disp”. We
can then use the up and down arrow keys to select the function we want.
The auto-completion works with functions, variables, files and graphic handles and makes the
development of scripts easier and faster.

The editor
Scilab version 5.2 provides a new editor which allows to edit scripts easily. Figure 5 presents the editor
during the editing of the previous ”Hello World!” example.

2

, The editor.

The editor can be accessed from the menu of the console, under the Applications > Editor menu, or
from the console, as presented in the following session.
-->editor()
This editor allows to manage several files at the same time, as presented in figure 5, where we edit five
files at the same time.
There are many features which are worth to mention in this editor. The most commonly used features
are under the Execute menu.

• Load into Scilaballows to execute the statements in the current file, as if we did a copy and paste.
This implies that the statements which do not end with the semicolon ”;” character will produce an
output in the console.

• Evaluate Selection allows to execute the statements which are currently selected.

• Execute File IntoScilaballows to execute the file, as if we used the exec function. The results which
are produced in the console are only those which are associated with printing functions, such as disp
for example.

3

, We can also select a few lines in the script, right click (or Cmd+Click under Mac), and get the context
menu which is presented in figure 6.
The Edit menu provides a very interesting feature, commonly known as a ”pretty printer” in most
languages. This is the Edit > Correct Indentation feature, which




Context menu in the editor.

automatically indents the current selection. This feature is extremelly convenient, as it allows to format
algorithms, so that the if, for and other structured blocks are easy to analyze.
The editor provides a fast access to the inline help. Indeed, assume that we have selected the disp
statement, as presented in figure 7. When we right-click in the editor, we get the context menu, where the
Help about ”disp” entry allows to open the help page associated with the disp function.




4

Geschreven voor

Instelling
Vak

Documentinformatie

Geüpload op
27 november 2022
Aantal pagina's
66
Geschreven in
2016/2017
Type
College aantekeningen
Docent(en)
Shaik afzal
Bevat
Alle colleges

Onderwerpen

$10.99
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Maak kennis met de verkoper
Seller avatar
techboom

Maak kennis met de verkoper

Seller avatar
techboom
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
-
Lid sinds
3 jaar
Aantal volgers
0
Documenten
1
Laatst verkocht
-

0.0

0 beoordelingen

5
0
4
0
3
0
2
0
1
0

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen