A Guide to Scilab with Applications
$7.99
Minimum price
$19.99
Suggested price

A Guide to Scilab with Applications

About the Book

This Guide to SCILAB is a comprehensive treatment of the Scilab software system. It contains brief explanations of Scilab commands, programming, and graphing capabilities. This book is intended for beginning and experienced science and mathematics students. Coverage includes Scilab commands used in courses that involve calculus, linear algebra, differential equations, and graphics with plenty of examples and applications.

About the Author

M. Affouf
M. Affouf

Mahmoud Affouf is an Associate Professor in the School of Mathematical Sciences at Kean University. Dr. Affouf completed his Ph.D. in applied mathematics at Courant Institute, NYU. His current research interests lie in the area of data analysis of health-related problems.

Table of Contents

Preface i 1 Scilab Basics 1 1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.2 Scilab System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.3 Scilab Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.4 Characters and Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.4.1 Special Characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.4.2 Arithmetic Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.4.3 Logical (Boolean) Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.4.4 Special Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 1.5 Built-in Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 1.5.1 Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 1.6 Homework: Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 2 Matrices 25 2.1 Generating Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 2.1.1 Generating vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 2.1.2 Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 2.1.3 Creating Column Vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 2.1.4 Concatenating Matrices and Vectors . . . . . . . . . . . . . . . . . . . . . . 32 2.1.5 Empty Vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 2.1.6 Addressing and Subsetting Matrices . . . . . . . . . . . . . . . . . . . . . . 34 2.1.7 Building New Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 2.2 Matrix Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 2.2.1 Constructing New Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 2.2.2 Elementwise Arithmetic Operations . . . . . . . . . . . . . . . . . . . . . . . 48 2.2.3 Vector Products . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 2.2.4 New Matrices from Given Matrices . . . . . . . . . . . . . . . . . . . . . . . 53 2.3 Systems of Linear Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 2.3.1 Basic Functions of Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 2.3.2 Solving Linear Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 2.3.3 Eigenvalues and Eigenvectors . . . . . . . . . . . . . . . . . . . . . . . . . . 62 2.4 Homework: Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 3 Programming 69 3.1 Script Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 3.2 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 3.3 Scilab time functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 3.4 Basic Scilab Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 3.4.1 Logical Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 3.4.2 Selection Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 3.4.3 Loop Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 3.5 Homework: Programming, Functions and Scripts . . . . . . . . . . . . . . . . . . 95 4 2-D Graphics 97 4.1 Basic 2-D (Two-dimensional) Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 4.1.1 Parametric and Polar Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 4.1.2 Combining plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 4.2 Advanced 2-D Graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 4.3 Homework: 2-d curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 5 3-D Curves 138 5.1 Line Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 6 Surface Plots 148 6.0.1 Mesh and Surface Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 6.0.2 plot3d and fplot3d functions . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 6.0.3 Contour Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 6.0.4 Color Shading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 6.1 Surfaces in parametric form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 6.2 Solids of Revolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 6.3 Homework: 3d Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 7 Data Analysis and Statistics 174 7.1 Data Entry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174 7.2 Data Analysis and Statistical Functions . . . . . . . . . . . . . . . . . . . . . . . . 179 7.3 Data Visualization and Simulations . . . . . . . . . . . . . . . . . . . . . . . . . . . 185 7.3.1 Histograms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185 7.3.2 Scatter Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 7.3.3 Bar Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 7.3.4 Pie Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 8 Computational Applications 192 8.1 Calculus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 8.1.1 Differentiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 8.1.2 Numerical Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 8.1.3 Zeros of equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198 8.2 Differential Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199 8.3 Fourier Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 8.4 Polynomials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210 8.5 Homework: Applications and Differential Equations . . . . . . . . . . . . . . . . 213

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

80% Royalties. Earn $16 on a $20 book.

We pay 80% royalties. That's not a typo: you earn $16 on a $20 sale. If we sell 5000 non-refunded copies of your book or course for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earnedover $13 millionwriting, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub