1. Introduction to Scilab
1.1 Introduction to Numerical Computing
Numerical computing is a field of mathematics where problems are made to be solved on a computing device. A variety of software tools exists for this purpose. In fact, MATLAB, Mathematica, Octave, and Scilab are specialized softwares for this purpose. A developer can also use general-purpose programming languages such as C, C++, Python, and Julia to define mathematical problems, but specialized softwares present predefined libraries that have been either optimized for stability or speed or, in same cases, for both. They can also be produced on targeted hardware for a chosen hardware platform. Thus, using specialized software is a good way to learn the numerical recipes for physical problems in an easy fashion. But, the primary question is why we should go for a numerical solution at all.
The postwar era has seen tremendous advances in computing technologies as well as in associated software development for specific purposes. Cost-effective computing resources have made it possible to simulate almost all physical problems. As a result, numerical computing has developed as a separate area of mathematics that constantly borrows and contributes to other areas of mathematics, creating an ecosystem of computing resources for model-based simulation of physical reality.
The need for numerical computing has its roots in the difficulty of deriving analytical solutions for problems. Analytical solutions start with a super-simplified version of physical reality. Such solution are then refined by adding complexities and defining additional parameters to the governing equation(s). But, most of the time, the efforts to just define the problem grow exponentially to the point that it becomes difficult even when you have a team of humans, let alone one person. Thus, the need for an alternative way became apparent, which came in the form of numerical computing.
While analytical computation requires only a pencil, paper, and the human mind, numerical computation requires a calculating device, or a computer. Successful implementation of a computing device to solve problems (especially involving repeated tasks) over a large array of data points was first observed in many fields of science and engineering, for example, when breaking an enemys secret codes and simulating nuclear reactions before nuclear explosions. The scope of numerical computation was further expanded for civilian purposes. Designing and simulating waterways, dams, electric power stations, and urban roadways are just a few areas of engineering where similar techniques were utilized. All of these applications needed to solve an equation or system of equations for a physical model representing a physical problem.
There are two ways in which we can solve these equationsnamely, by using analytical methods and by implementing numerical techniques. We will only concentrate on numerical methods of solving equations in this book.
As time progressed, various schemes to define analytical functions like differentiation, integration, and trigonometricwere written for digital computers. This involved their digitization, which certainly introduced some errors. Knowledge of the introduced errors and their proper nullification yielded valuable information quicker than analytical results. Thus, it became one of the most actively researched fields of science and continues to be one to this day. The search for faster and accurate algorithms continues to drive innovation in the field of numerical computing and enables humanity to simulate otherwise impossible tasks.
1.2 Various Software Alternatives
A number of alternatives exists to perform numerical computation. Programming languages written to handle mathematical functions, such as FORTRAN, C, Python, and Java, can be used to write algorithms for numerical computation. A set of specialized softwares exists that include MATLAB, Scilab, and Mathematica. Their rich libraries now run in many GBs of data. MATLAB has been tremendously popular among the scientific community since 1984. The cheap availability of digital computing resources propelled its usage in industry and academia to such an extent that virtually every lab needed MATLAB. Even though it wasnt very expensive for a relatively rich western world, it proved to be a costly piece of software for the rest of the world, particularly third-world countries. This part of the world, which has a rich pool of scientists, needed an open source alternative to MATLAB. The solution came in the form of Octave and Scilab. Scilab is extremely powerful, yet it was not designed exactly along the lines of MATLAB, syntax-wise. On the other hand, Octave was developed so that MATLABs .m files could directly run on Octave. Scilab is now being developed for developers who would like to shift their work to an open source platform completely but do not mind editing their MATLAB files if required.
When compared to the MATLAB package , including specialized packages for various engineering domains and Simulink for the graphical programming paradigm, Octave presents a limited variety of solutions. It includes almost all the functions found in MATLABs basic package and some specialized packages, but it does not provide Simulinks equivalent. One the other hand, Scilab proves to be a complete alternative since Scilabs XCOS provides Simulinks equivalent, and specialized packages of Scilab can rival the packages provided by MATLABs functionalities. In this book, we will introduce their basic usage.
Other alternatives include programming languages such as Python, C, C++, and Java. They each have advantages as well as disadvantages, so we advise users to consider their own needs when they make their choice. Scilab is a good choice for prototyping a problem quickly and checking the results. General-purpose programming languages turn out to be a better alternative while working with web-based data collection, analysis and visualization, and implementation of a physical problem on a physical computing platform like FPGA boards, microcontrollers, and so on. Scilab is a high-level language, primarily intended for numerical computation, and it has a rich library of tools for solving numerical linear algebra problems, finding the roots of nonlinear equations, integrating ordinary functions, manipulating polynomials, and solving ordinary as well as partial-differential and differential algebraic equations. This makes it suitable for most basic numerical computational work.
1.3 History
The history of Scilabs creation starts in the 1980s []. It was inspired by MATLABs Fortran code, which was developed by Cleve Moler. Moler later cofounded the MathWorks company with John Little. Scilab initially started as Blaise, a CACSD (computer-aided control system design) software. It was created at the IRIA (French Institute for Research in Computer Science and Control) by Franois Delebecque and Serge Steer. In 1984, Blaise became Basile and was distributed for a few years by Simulog, the first Inria (French National Institute for Research in Computer Science and Control) startup.
In the 1990s, Simulog stopped distributing Basile. Inria renamed the software Scilab and continued its developed with just six researchers. Scilab 1 . 1 was released on January 2, 1994, under an open source license. Until version 2 . 7, the Scilab community grew quite large. With support from companies and institutions, the Scilab Consortium was created in 2003 by Inria. In June 2017, Scilab Enterprises was formed and took charge of development. Based on the classic open source business model, Scilab Enterprises also offered professional services and support for Scilab. Scilab Enterprises joined the ESI group in 2017 and now develops as well as provides services related to Scilab. Scilab is in use in every strategic domain of science, industry, and services including space, aeronautics, automobile, energy, defense, finance, and transport.