SCILAB CHALLENGE@NTU 
Project Briefing 
LEE Kar Heng, Ph.D 
Chief, TBSS Group
2 
THE TBSS-SCILAB PARTNERSHIP 
• Singapore (TBSS-Scilab Singapore Center) 
• Vietnam (TBSS Khai Kinh Co. Ltd.) 
• Oversees and Manages Scilab activities in 
– Training and Education 
– Project and Consultancy 
– Migration and Deployment 
– Specialized Developments 
– Scilab User Group Management, Operations and Support 
• Manages, administers and funds the Singapore and 
Vietnam Scilab User Groups 
• Manages Scilab projects in Singapore and Vietnam
3 
PROJECT OBJECTIVES 
• To promote use of Scilab in academic 
institutions, currently NTU and TP 
• To facilitate the use of Scilab to solve a specific 
problem 
• To enable the students appreciate Scilab 
• To provide a channel for students to present 
findings in the ScilabTec2015 conference, Paris 
• To reward capable students accordingly
4 
THE SCILAB CHALLENGE PROJECT 
• Scilab Challenge 2014/2015 requires students to work 
on a project that uses Scilab as the main scientific tool 
in the simulation and computation of the solution to 
the problem they are investigating 
• Top 5 projects will be presented with cash prize of 
SGD300.00, certificate and medal 
• All participants will be presented certificate and medal 
• Identified projects will be required to submit a 
technical paper to the ScilabTEC2015 Committee 
• The selected project team will be sponsored to present 
the findings at the ScilabTEC2015 Conference in Paris
BENEFITS 
• Gain skillset in use of Scilab 
• Participation in project gives advantage in 
seeking employment 
• Participation in international conference is 
widely accepted as a professional recognition 
• Possibility to work for Scilab Enterprise, TBSS-Scilab 
or other Scilab partners 
5
6 
SCILAB CHALLENGE@NTU 
• The problem is “A Radar Design Toolbox for 
Scilab and XCos” 
• Important dates: 
15/10/14 – registration closed 
15/12/14 – submit a one-page report 
22/12/14 – announce selected projects 
30/04/15 – submit a 6-page final report 
11/05/15 – prize presentation 
21/05/15 – ScilabTEC2015
PROJECT DESCRIPTION 
• The problem is “A Radar Design Toolbox for Scilab and XCos” 
• The objectives of this project include investigations, design, 
simulation and development of a set of development tools 
using Scilab and XCos 
• The development tool shall allow users to configure a radar 
system with different antennas, transmitter, receiver, and 
other subsystems 
• The project also aims to simulate a typical entire radar system 
into model through the use of the developed tool and predict 
the behavior of system’s output 
• A series of plots shall be presented for user to analyze the 
performance of the system design
PROJECT DESCRIPTION 
• To achieve this main objective, it is necessary to analyse, and 
research and carry out simulations of radar equations, 
algorithm related on to the radar 
• Conduct a detailed survey study of radar signal processing 
• Develop the XCos models and write Scilab programs for 
various radar system components. 
• These components can be connected to give a complete radar 
system. 
• The development tool will then simulate the entire radar 
system and present plots for users to performance analyse 
and evaluation
PROJECT DESCRIPTION 
• An illustration:
PROJECT SUPPORT 
• Community support 
– TBSS-Scilab User Group at Facebook (General enquiries on Scilab) 
– Scilab Challenge@NTU 2014/2015 (Project related matters, 
announcement, …) 
• Contact 
– Lee Kar Heng (karheng@tbssc3e.com) (project matters) 
– Tan Thiam Huat (tanthiamhuat@e.ntu.edu.sg) (Scilab matters)
HISTORY 
1980: first MATLAB 
1980 – 1990: BASILE software at Inria / Simulog 
1 - Scilab made by Inria 
1990 – 2003: Open Source Scilab (Research) 
Scilab freely distributed on the Net in 1994 
2 - Scilab industrialization 
2003 – 2007: Scilab Consortium phase 1 (Inria) 
2008 – 2012: Scilab Consortium phase 2 (DIGITEO Foundation) 
2008: Free Scilab (GPL compatible) 
2009: Xcos industrialization 
3 – Scilab Enterprises 
2010: Transfer to Scilab Enterprises Company 
2012: Exclusivity of trademark, development and publishing of Scilab
• Scilab 
SCILAB DISTRIBUTION 
Powerful Computation Engine 
• Xcos 
Dynamic Systems Modeling and 
Simulation 
• ATOMS (AuTomatic mOdules 
Management for Scilab) 
Module Management
SCILAB: FREE AND OPEN SOURCE 
• High level 
programming language 
• Hundreds of 
mathematical functions 
• Advanced data 
structures & user-defined 
data types 
• Computation engine 
easy to embed into 
applications 
• Open System: 
extended capabilities 
with professional & 
specialized modules
KEY SCIENTIFIC FEATURES 
More than 2,000 functions: 
• Mathematical functions 
• Matrix computation, sparse 
matrices 
• Polynomials and rational 
functions 
• Simulation: ODE and DAE 
• Classic and robust control, LMI 
optimization 
• Differentiable and non 
differentiable optimization 
• Interpolation, approximation 
• Signal processing 
• Statistics 
• Xcos: hybrid dynamical systems 
modeler and simulator
• Dynamic System Modeling and 
Simulation 
• A user-friendly GUI-based editor 
for modeling and simulating hybrid 
dynamical systems as block 
diagrams: model construction, 
edition and customization 
• Integrated Modelica Compiler 
• Freely Available and distributed 
with Scilab 
XCOS
XCOS MAIN FEATURES 
• Graphically model, compile, and simulate dynamical 
systems 
• Combine continuous and discrete-time behaviors in the 
same model 
• Select model elements from Palettes of standard blocks 
• Program new blocks in C, Fortran, or Scilab language 
• HDF5 standard which has been chosen to guarantee data 
exchanges between Scilab and Xcos Editor 
• Free Modelica compiler which enables the simulation of 
implicit diagrams 
• Graphical user interface based on JGraphX
PROGRAMMING ENVIRONMENT 
Variable 
Browser 
File Browser 
Command 
History 
Console
PROGRAMMING ENVIRONMENT 
Editor 2-D/3-D Visualization 
Embedded Help 
External Modules 
Manager 
Variable Editor
GRAPHICAL USER INTERFACES 
• Great number of 
functionalities to create 
Graphical User Interfaces 
• Accessible from Scilab 
• Interaction between GUI and 
plots 
• Fully integrated in OS 
environment
LATEST RELEASE SCILAB 5.5.0 
What’s new? 
• Graphics: speed (Matplot), datatips, 
interactions, 3-D lightning 
• Graphical User Interface: new UI 
Controls 
• Remote file Access (sciCurl) 
• Scilab/MPI (Message Passing 
Interface) 
• Java Integration (JIMS) 
• HDF5 management 
• Localization of external modules 
Works under Windows XP/Vista/7/8, 
GNU/Linux and Mac OS X, 32 bits and 
64 bits
LINKS WITH OTHER LANGUAGES 
• Management of C, C++, Fortran, Java, 
Python, .net... from Scilab: JIMS module for 
Java 
• Available as a computing engine with C, 
C++, Java, Python, .net API... 
• Links with: 
– Excel®, COM/DCOM® (Microsoft), 
– Labview® (National Instruments), 
– Isight® (Dassault Systèmes), 
– Alternova® (Eurodecision), 
– modeFRONTIER® (ESTECO), 
– etc.
LINKS WITH OTHER LANGUAGES 
About 100,000 monthly downloads from 150 
countries on www.scilab.org
USERS 
Main industrial sectors 
• Aerospace: Airbus Group, CNES, 
Safran, Dassault Aviation 
• Transportation: Renault, LEONI, 
Siemens, Alstom, Faurecia 
• Mechanical: ArcelorMittal, Aperam 
• Energy: EDF, RTE, CEA, Total, IFP 
• Defence: DGA, THALES 
• Health: SANOFI 
• Telecom: Orange 
• Earth Science: BRGM, Eramet 
Academics, education 
 High schools (French high 
schools) 
 Engineering schools (TP, …) 
 Universities (HCMUT, NUT, 
SUTD, …) 
In red: Scilab Enterprises customers
CHANGING TO SCILAB 
Scilab is free software 
– Easy to install everywhere 
– Large community of users 
But freedom is not enough 
A friendly software with a lot of functionalities 
– Included toolboxes for most of applied mathematics 
– Own dedicated OpenGL graphics 
– Xcos comparable to Simulink 
– Easy to add interactively external module 
A comprehensive organization takes care of Scilab 
– Scilab developed professionally by Scilab Enterprises 
– Supports and services 
– IPC Scilab Users Group with important Companies
SCILAB … MATLAB 
Scilab is not a clone of Matlab 
• Very similar languages 
• Same simple graphics functions: plot, bar, mesh, pie, surf 
• But different syntax and semantics for many functions: 
- Syntax example: “eigen” vs. “spec” 
- Semantics example: “max” function 
- Different management of source files 
Matlab / Scilab dictionary available in the Scilab help
SCILAB AS A CALCULATOR 
• Matrix computations: 
A=rand(1000,1000); b=rand(1000,1); 
x=Ab; norm(A*x-b) 
vp=spec(A); 
• 2D plots: 
plot(real(vp),imag(vp),"*r"); 
x=linspace(-%pi,%pi,1000); 
clf; plot(x,sin(x),"r",x,cos(x),"g"); 
 3D curve: 
k=tan(%pi/27);t=linspace(-40,40,1000); 
x=cos(t)./cosh(k*t); y=sin(t)./cosh(k*t); z=tanh(k*t); 
clf; param3d(x,y,z);
SCILAB AS A CALCULATOR 
 3D beautiful surface: 90,000 points 
function z=f(x,y) // function defining the surface 
z=exp(exp(-x^2-y^2)*(exp(cos(x^2+y^2)^20)+.. 
8*sin(x^2+y^2)^20+2*sin(2*(x^2+y^2))^8)); 
endfunction 
x=linspace(-1.5,1.5,300); y=linspace(-1.5,1.5,300); z=feval(x,y,f); 
f=scf(0); f.color_map=rainbowcolormap(32); 
surf(x,y,z); // plot the surface 
e=gce(); e.color_mode=-1; 
a=gca(); a.box="off"; 
a.axes_visible=["off","off","off"]; 
a.x_label.visible="off"; 
a.y_label.visible="off"; 
a.z_label.visible="off";
SCILAB AS A PLOTTING TOOL 
To plot data in 2D with color according to the value of the points, modify 
data and then plot again 
Data are given in text file mandel.txt (2 million points, 19 Mb). 
1. Put data into Scilab matrix M: 
M=fscanfMat("mandel.txt"); 
2. Open graphics window, choose beautiful colormap and plot 
points according to its value: 
f=scf(1); f.color_map = rainbowcolormap(256); 
Matplot(M); 
3. Discard points with value between 50 and 210 and plot in another 
window: 
M(find(50<M & M<210))=1; 
f=scf(2); f.color_map = rainbowcolormap(256); 
Matplot(M);
SCILAB AS A PLOTTING TOOL 
Plotting is instantaneous: 
First plot Second plot
SCILAB FILE HANDLING 
To read text file takes time: 
M=fscanfMat("mandel.txt"); // 5 seconds 
1. Save matrix into binary SOD (Scilab Open Data) based on HDF5 
standard: 
save("mandel.sod","M"); // 0.04 second 
2. Loading into Scilab is now very fast: 
load("mandel.sod"); // 0.1 second
SCILAB PROGRAMMING 
• Friendly editor, powerful mathematical language close 
to natural language: 
function u=Newton(f,fprim,u0,eps) 
u=u0; 
while abs(f(u))>eps then 
fp=fprim(u); 
if abs(fp)<=%eps then 
error("singularity") 
end 
u=u-f(u)/fp 
end 
endfunction 
 About 1,300 Scilab functions are written in Scilab
SCILAB PROGRAMMING 
Gaussian elimination with partial pivoting: 
function x=Gauss(A,b,eps) 
n=size(b,"*"); x=b; 
for k=1:n-1 
Scilab vectorized syntax 
// when the diagonal term is close to 0 
// searching for a non zero element in the column 
if abs(A(k,k))<eps then 
kk=find(abs(A(k:n,k))>eps); 
if kk==[] then 
disp(“Non invertible Matrix"); 
return; 
end 
// exchanging lines k and kk in A and in b 
kk=kk(1); 
lignek=A(k,:); A(k,:)=A(kk,:); A(kk,:)=lignek; 
lignek=b(k); b(k)=b(kk); b(kk)=lignek; 
end 
// Gauss algorithm 
for l=k+1:n 
p=A(l,k)/A(k,k); 
for m=k:n 
A(l,m)=A(l,m)-A(k,m)*p; 
end 
x(l)=x(l)-x(k)*p; 
end 
end 
if abs(A(n,n))<eps then 
disp("Non invertible Matrix "); 
return; 
end 
// compute x 
x(n)=x(n)/A(n,n); 
for i=n-1:-1:1 
s=0; 
for j=i+1:n 
s=s+A(i,j)*x(j); 
end 
x(i)=(x(i)-s)/A(i,i); 
end 
endfunction
GUI WITH SCILAB 5.5.0 
New components, speed, default look and feel of the OS 
Save and load GUI as XML files 
: 
• Save GUI with: 
saveGui(f,"mygui.xml"); 
• Load GUI with: 
f=loadGui("mygui.xml");
Scilab 
is 
The Professional Free 
Software for Numerical Computation 
Industry, Education and Research

Scilab Challenge@NTU 2014/2015 Project Briefing

  • 1.
    SCILAB CHALLENGE@NTU ProjectBriefing LEE Kar Heng, Ph.D Chief, TBSS Group
  • 2.
    2 THE TBSS-SCILABPARTNERSHIP • Singapore (TBSS-Scilab Singapore Center) • Vietnam (TBSS Khai Kinh Co. Ltd.) • Oversees and Manages Scilab activities in – Training and Education – Project and Consultancy – Migration and Deployment – Specialized Developments – Scilab User Group Management, Operations and Support • Manages, administers and funds the Singapore and Vietnam Scilab User Groups • Manages Scilab projects in Singapore and Vietnam
  • 3.
    3 PROJECT OBJECTIVES • To promote use of Scilab in academic institutions, currently NTU and TP • To facilitate the use of Scilab to solve a specific problem • To enable the students appreciate Scilab • To provide a channel for students to present findings in the ScilabTec2015 conference, Paris • To reward capable students accordingly
  • 4.
    4 THE SCILABCHALLENGE PROJECT • Scilab Challenge 2014/2015 requires students to work on a project that uses Scilab as the main scientific tool in the simulation and computation of the solution to the problem they are investigating • Top 5 projects will be presented with cash prize of SGD300.00, certificate and medal • All participants will be presented certificate and medal • Identified projects will be required to submit a technical paper to the ScilabTEC2015 Committee • The selected project team will be sponsored to present the findings at the ScilabTEC2015 Conference in Paris
  • 5.
    BENEFITS • Gainskillset in use of Scilab • Participation in project gives advantage in seeking employment • Participation in international conference is widely accepted as a professional recognition • Possibility to work for Scilab Enterprise, TBSS-Scilab or other Scilab partners 5
  • 6.
    6 SCILAB CHALLENGE@NTU • The problem is “A Radar Design Toolbox for Scilab and XCos” • Important dates: 15/10/14 – registration closed 15/12/14 – submit a one-page report 22/12/14 – announce selected projects 30/04/15 – submit a 6-page final report 11/05/15 – prize presentation 21/05/15 – ScilabTEC2015
  • 7.
    PROJECT DESCRIPTION •The problem is “A Radar Design Toolbox for Scilab and XCos” • The objectives of this project include investigations, design, simulation and development of a set of development tools using Scilab and XCos • The development tool shall allow users to configure a radar system with different antennas, transmitter, receiver, and other subsystems • The project also aims to simulate a typical entire radar system into model through the use of the developed tool and predict the behavior of system’s output • A series of plots shall be presented for user to analyze the performance of the system design
  • 8.
    PROJECT DESCRIPTION •To achieve this main objective, it is necessary to analyse, and research and carry out simulations of radar equations, algorithm related on to the radar • Conduct a detailed survey study of radar signal processing • Develop the XCos models and write Scilab programs for various radar system components. • These components can be connected to give a complete radar system. • The development tool will then simulate the entire radar system and present plots for users to performance analyse and evaluation
  • 9.
    PROJECT DESCRIPTION •An illustration:
  • 10.
    PROJECT SUPPORT •Community support – TBSS-Scilab User Group at Facebook (General enquiries on Scilab) – Scilab Challenge@NTU 2014/2015 (Project related matters, announcement, …) • Contact – Lee Kar Heng (karheng@tbssc3e.com) (project matters) – Tan Thiam Huat (tanthiamhuat@e.ntu.edu.sg) (Scilab matters)
  • 11.
    HISTORY 1980: firstMATLAB 1980 – 1990: BASILE software at Inria / Simulog 1 - Scilab made by Inria 1990 – 2003: Open Source Scilab (Research) Scilab freely distributed on the Net in 1994 2 - Scilab industrialization 2003 – 2007: Scilab Consortium phase 1 (Inria) 2008 – 2012: Scilab Consortium phase 2 (DIGITEO Foundation) 2008: Free Scilab (GPL compatible) 2009: Xcos industrialization 3 – Scilab Enterprises 2010: Transfer to Scilab Enterprises Company 2012: Exclusivity of trademark, development and publishing of Scilab
  • 12.
    • Scilab SCILABDISTRIBUTION Powerful Computation Engine • Xcos Dynamic Systems Modeling and Simulation • ATOMS (AuTomatic mOdules Management for Scilab) Module Management
  • 13.
    SCILAB: FREE ANDOPEN SOURCE • High level programming language • Hundreds of mathematical functions • Advanced data structures & user-defined data types • Computation engine easy to embed into applications • Open System: extended capabilities with professional & specialized modules
  • 14.
    KEY SCIENTIFIC FEATURES More than 2,000 functions: • Mathematical functions • Matrix computation, sparse matrices • Polynomials and rational functions • Simulation: ODE and DAE • Classic and robust control, LMI optimization • Differentiable and non differentiable optimization • Interpolation, approximation • Signal processing • Statistics • Xcos: hybrid dynamical systems modeler and simulator
  • 15.
    • Dynamic SystemModeling and Simulation • A user-friendly GUI-based editor for modeling and simulating hybrid dynamical systems as block diagrams: model construction, edition and customization • Integrated Modelica Compiler • Freely Available and distributed with Scilab XCOS
  • 16.
    XCOS MAIN FEATURES • Graphically model, compile, and simulate dynamical systems • Combine continuous and discrete-time behaviors in the same model • Select model elements from Palettes of standard blocks • Program new blocks in C, Fortran, or Scilab language • HDF5 standard which has been chosen to guarantee data exchanges between Scilab and Xcos Editor • Free Modelica compiler which enables the simulation of implicit diagrams • Graphical user interface based on JGraphX
  • 17.
    PROGRAMMING ENVIRONMENT Variable Browser File Browser Command History Console
  • 18.
    PROGRAMMING ENVIRONMENT Editor2-D/3-D Visualization Embedded Help External Modules Manager Variable Editor
  • 19.
    GRAPHICAL USER INTERFACES • Great number of functionalities to create Graphical User Interfaces • Accessible from Scilab • Interaction between GUI and plots • Fully integrated in OS environment
  • 20.
    LATEST RELEASE SCILAB5.5.0 What’s new? • Graphics: speed (Matplot), datatips, interactions, 3-D lightning • Graphical User Interface: new UI Controls • Remote file Access (sciCurl) • Scilab/MPI (Message Passing Interface) • Java Integration (JIMS) • HDF5 management • Localization of external modules Works under Windows XP/Vista/7/8, GNU/Linux and Mac OS X, 32 bits and 64 bits
  • 21.
    LINKS WITH OTHERLANGUAGES • Management of C, C++, Fortran, Java, Python, .net... from Scilab: JIMS module for Java • Available as a computing engine with C, C++, Java, Python, .net API... • Links with: – Excel®, COM/DCOM® (Microsoft), – Labview® (National Instruments), – Isight® (Dassault Systèmes), – Alternova® (Eurodecision), – modeFRONTIER® (ESTECO), – etc.
  • 22.
    LINKS WITH OTHERLANGUAGES About 100,000 monthly downloads from 150 countries on www.scilab.org
  • 23.
    USERS Main industrialsectors • Aerospace: Airbus Group, CNES, Safran, Dassault Aviation • Transportation: Renault, LEONI, Siemens, Alstom, Faurecia • Mechanical: ArcelorMittal, Aperam • Energy: EDF, RTE, CEA, Total, IFP • Defence: DGA, THALES • Health: SANOFI • Telecom: Orange • Earth Science: BRGM, Eramet Academics, education  High schools (French high schools)  Engineering schools (TP, …)  Universities (HCMUT, NUT, SUTD, …) In red: Scilab Enterprises customers
  • 24.
    CHANGING TO SCILAB Scilab is free software – Easy to install everywhere – Large community of users But freedom is not enough A friendly software with a lot of functionalities – Included toolboxes for most of applied mathematics – Own dedicated OpenGL graphics – Xcos comparable to Simulink – Easy to add interactively external module A comprehensive organization takes care of Scilab – Scilab developed professionally by Scilab Enterprises – Supports and services – IPC Scilab Users Group with important Companies
  • 25.
    SCILAB … MATLAB Scilab is not a clone of Matlab • Very similar languages • Same simple graphics functions: plot, bar, mesh, pie, surf • But different syntax and semantics for many functions: - Syntax example: “eigen” vs. “spec” - Semantics example: “max” function - Different management of source files Matlab / Scilab dictionary available in the Scilab help
  • 26.
    SCILAB AS ACALCULATOR • Matrix computations: A=rand(1000,1000); b=rand(1000,1); x=Ab; norm(A*x-b) vp=spec(A); • 2D plots: plot(real(vp),imag(vp),"*r"); x=linspace(-%pi,%pi,1000); clf; plot(x,sin(x),"r",x,cos(x),"g");  3D curve: k=tan(%pi/27);t=linspace(-40,40,1000); x=cos(t)./cosh(k*t); y=sin(t)./cosh(k*t); z=tanh(k*t); clf; param3d(x,y,z);
  • 27.
    SCILAB AS ACALCULATOR  3D beautiful surface: 90,000 points function z=f(x,y) // function defining the surface z=exp(exp(-x^2-y^2)*(exp(cos(x^2+y^2)^20)+.. 8*sin(x^2+y^2)^20+2*sin(2*(x^2+y^2))^8)); endfunction x=linspace(-1.5,1.5,300); y=linspace(-1.5,1.5,300); z=feval(x,y,f); f=scf(0); f.color_map=rainbowcolormap(32); surf(x,y,z); // plot the surface e=gce(); e.color_mode=-1; a=gca(); a.box="off"; a.axes_visible=["off","off","off"]; a.x_label.visible="off"; a.y_label.visible="off"; a.z_label.visible="off";
  • 28.
    SCILAB AS APLOTTING TOOL To plot data in 2D with color according to the value of the points, modify data and then plot again Data are given in text file mandel.txt (2 million points, 19 Mb). 1. Put data into Scilab matrix M: M=fscanfMat("mandel.txt"); 2. Open graphics window, choose beautiful colormap and plot points according to its value: f=scf(1); f.color_map = rainbowcolormap(256); Matplot(M); 3. Discard points with value between 50 and 210 and plot in another window: M(find(50<M & M<210))=1; f=scf(2); f.color_map = rainbowcolormap(256); Matplot(M);
  • 29.
    SCILAB AS APLOTTING TOOL Plotting is instantaneous: First plot Second plot
  • 30.
    SCILAB FILE HANDLING To read text file takes time: M=fscanfMat("mandel.txt"); // 5 seconds 1. Save matrix into binary SOD (Scilab Open Data) based on HDF5 standard: save("mandel.sod","M"); // 0.04 second 2. Loading into Scilab is now very fast: load("mandel.sod"); // 0.1 second
  • 31.
    SCILAB PROGRAMMING •Friendly editor, powerful mathematical language close to natural language: function u=Newton(f,fprim,u0,eps) u=u0; while abs(f(u))>eps then fp=fprim(u); if abs(fp)<=%eps then error("singularity") end u=u-f(u)/fp end endfunction  About 1,300 Scilab functions are written in Scilab
  • 32.
    SCILAB PROGRAMMING Gaussianelimination with partial pivoting: function x=Gauss(A,b,eps) n=size(b,"*"); x=b; for k=1:n-1 Scilab vectorized syntax // when the diagonal term is close to 0 // searching for a non zero element in the column if abs(A(k,k))<eps then kk=find(abs(A(k:n,k))>eps); if kk==[] then disp(“Non invertible Matrix"); return; end // exchanging lines k and kk in A and in b kk=kk(1); lignek=A(k,:); A(k,:)=A(kk,:); A(kk,:)=lignek; lignek=b(k); b(k)=b(kk); b(kk)=lignek; end // Gauss algorithm for l=k+1:n p=A(l,k)/A(k,k); for m=k:n A(l,m)=A(l,m)-A(k,m)*p; end x(l)=x(l)-x(k)*p; end end if abs(A(n,n))<eps then disp("Non invertible Matrix "); return; end // compute x x(n)=x(n)/A(n,n); for i=n-1:-1:1 s=0; for j=i+1:n s=s+A(i,j)*x(j); end x(i)=(x(i)-s)/A(i,i); end endfunction
  • 33.
    GUI WITH SCILAB5.5.0 New components, speed, default look and feel of the OS Save and load GUI as XML files : • Save GUI with: saveGui(f,"mygui.xml"); • Load GUI with: f=loadGui("mygui.xml");
  • 34.
    Scilab is TheProfessional Free Software for Numerical Computation Industry, Education and Research