Example: biology

INTRODUCTION TO SCILAB - MARS Lab

INTRODUCTION TO SCILAB " %#$# ! Pre-defined mathematical variables .. Booleans .. Complex numbers .. Strings .. Dynamic type of variables ..214 Overview .. Create a matrix of real values .. The empty matrix[].. Query matrices .. Accessing the elements of a matrix .. The colon : operator .. The dollar $ operator .. Low-level operations .. Elementwise operations .. Higher level linear algebra features ..315 Looping and Theifstatement .. Theselectstatement .. Theforstatement .. Thewhilestatement .. Thebreakandcontinuestatements ..356 Overview .. Defining a function .. Function libraries .. Managing output arguments.

LabVIEW, a platform and development environment for a visual programming language from National Instruments. From the license point of view, Scilab is a free software in the sense that the user does not pay for it and Scilab is an open source software, provided under the Cecill license [2]. The software is

Tags:

  Introduction, Scilab, Labview

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of INTRODUCTION TO SCILAB - MARS Lab

1 INTRODUCTION TO SCILAB " %#$# ! Pre-defined mathematical variables .. Booleans .. Complex numbers .. Strings .. Dynamic type of variables ..214 Overview .. Create a matrix of real values .. The empty matrix[].. Query matrices .. Accessing the elements of a matrix .. The colon : operator .. The dollar $ operator .. Low-level operations .. Elementwise operations .. Higher level linear algebra features ..315 Looping and Theifstatement .. Theselectstatement .. Theforstatement .. Thewhilestatement .. Thebreakandcontinuestatements ..356 Overview .. Defining a function .. Function libraries .. Managing output arguments.

2 427 Overview .. 2D plot .. Titles, axis and legends .. Export ..468 Notes and references479 Acknowledgments48 Bibliography49 Index4921 OverviewScilab is a programming language associated with a rich collection of numerical algorithms cov-ering many aspects of scientific computing the software point of view, SCILAB is aninterpretedlanguage. This generally allows toget faster development processes, because the user directly accesses to a high level language, witha rich set of features provided by the library. The SCILAB language is meant to be extended sothat user-defined data types can be defined with possibly overloaded operations. SCILAB users candevelop their own module so that they can solve their particular problems.

3 The SCILAB languageallows to dynamically compile and link other languages such as Fortran and C: this way, externallibraries can be used as if they were a part of SCILAB built-in features. SCILAB also interfacesLabVIEW, a platform and development environment for a visual programming language fromNational the license point of view, SCILAB is a free software in the sense that the user does not payfor it and SCILAB is an open source software, provided under the Cecill license [2]. The software isdistributed with source code, so that the user has an access to SCILAB most internal aspects. Mostof the time, the user downloads and installs, a binary version of SCILAB since the SCILAB consortiumprovides Windows, Linux and Mac OS executable versions.

4 An online help is provided in manylocal a scientific point of view, SCILAB comes with many features. At the very beginning ofScilab, features were focused on linear algebra. But, rapidly, the number of features extended tocover many areas of scientific computing. The following is a short list of its capabilities: Linear algebra, sparse matrices, Polynomials and rational functions, Interpolation, approximation, Linear, quadratic and non linear optimization, Ordinary Differential Equation solver and Differential Algebraic Equations solver, Classic and robust control, Linear Matrix Inequality optimization, Differentiable and non-differentiable optimization, Signal processing, provides many graphics features, including a set of plotting functions, which allow tocreate 2D and 3D plots as well as user interfaces.

5 The Xcos environment provides an hybriddynamic systems modeler and How to get and install ScilabWhatever your platform is ( Windows, Linux or Mac), SCILAB binaries can be downloadeddirectly from the SCILAB homepage3 Figure 1: SCILAB console under from the Download binaries are provided for both 32 and 64 bits platforms so that it matches the targetinstallation can also be downloaded in source form, so that you can compile SCILAB by yourselfand produce your own binary. Compiling SCILAB and generating a binary is especially interestingwhen we want to understand or debug an existing feature, or when we want to add a new compile SCILAB , some prerequisites binary files are necessary, which are also provided in theDownload center.

6 Moreover, a Fortran and a C compiler are required. Compiling SCILAB isa process which will not be detailed further in this document, because this chapter is mainlydevoted to the external behavior of Installing SCILAB under WindowsScilab is distributed as a Windows binary and an installer is provided so that the installation isreally easy. The SCILAB console is presented in figure 1. Several comments may be done aboutthis installation Windows, if your machine is based on an Intel processor, the Intel Math Kernel Library(MKL) [4] enables SCILAB to perform faster numerical Installing SCILAB under LinuxUnder Linux, the binary versions are available from SCILAB website as . files. There is noneed for an installation program with SCILAB under Linux: simply unzip the file in one target4directory.

7 Once done, the binary file is located in<path> When thisscript is executed, the console immediately appears and looks exactly the same as on that SCILAB is also distributed with the packaging system available with Linux distribu-tions based on Debian (for example, Ubuntu). That installation method is extremely simple andefficient. Nevertheless, it has one little drawback: the version of SCILAB packaged for your Linuxdistribution may not be up-to-date. This is because there is some delay (from several weeks toseveral months) between the availability of an up-to-date version of SCILAB under Linux and itsrelease in Linux now, SCILAB comes on Linux with a linear algebra library which is optimized and guaranteesportability. Under Linux, SCILAB does not come with a binary version of ATLAS [1], so that linearalgebra is a little slower for that Installing SCILAB under Mac OSUnder Mac OS, the binary versions are available from SCILAB website as a.

8 Dmg file. This binaryworks for Mac OS versions starting from version It uses the Mac OS installer, which providesa classical installation process. SCILAB is not available on Power PC version for Mac OS comes with a Tcl / Tk library which is disabled for technicalreasons. As a consequence, there are some small limitations on the use of SCILAB on this example, the SCILAB / Tcl interface (TclSci), the graphic editor and the variable editor are notworking. These features will be rewritten in Java in future versions of SCILAB and these limitationswill , using SCILAB on Mac OS system is easy, and uses the shorcuts which are familiar to usersof this platform. For example, the console and the editor use the Cmd key (Apple key) which isfound on Mac keyboards.

9 Moreover, there is no right-click on this platform. Instead, SCILAB issensitive to the Control-Click keyboard now, SCILAB comes on Mac OS with a linear algebra library which is optimized and guar-antees portability. Under Mac OS, SCILAB does not come with a binary version of ATLAS [1], sothat linear algebra is a little slower for that How to get helpThe most simple way to get the online help integrated to SCILAB is to use the functionhelp. Thefigure 2 presents the SCILAB help window. To use this function, simply type help in the consoleand press the<Enter>key, as in the following that you want some help about theoptimfunction. You may try to browse theintegrated help, find the optimization section and then click on theoptimitem to display its possibility is to use the functionhelp, followed by the name of the function whichhelp is required, as in the following optimScilab automatically opens the associated entry in the can also use the help provided on SCILAB web 2: SCILAB help page always contains the help for the up-to-date version of SCILAB .

10 By using the search feature of my web browser, I can most of the time quickly find the help I need. With that method,I can see the help of several SCILAB commands at the same time (for example the commandsderivativeandoptim, so that I can provide the cost function suitable for optimization withoptimby computing derivatives withderivative).A list of commercial books, free books, online tutorials and articles is presented on the Scilabhomepage: Mailing lists, wiki and bug reportsThe mailing designed for all SCILAB usage questions. To subscribe tothis mailing list, send an e-mail The mailing on the development of SCILAB , be it the development of SCILAB core or of complicated mod-ules which interacts deeply with SCILAB core.


Related search queries