Introduction

MATLAB is a powerful language for technical computing. The name MATLAB stands for MATrix LABoratory, because its basic data element is a matrix (array). MATLAB can be used for math computations, modeling and simulations, data analysis and processing, visualization and graphics, and algorithm development.

MATLAB is widely used in universities and colleges in introductory and advanced courses in mathematics, science, and especially engineering. In industry the software is used in research, development, and design. The standard MATLAB program has tools (functions) that can be used to solve common problems. In addition, MATLAB has optional toolboxes that are collections of specialized programs designed to solve specific types of problems. Examples include toolboxes for signal processing, symbolic calculations, and control systems.

Until recently, most of the users of MATLAB have been people with previous knowledge of programming languages such as FORTRAN and C who switched to MATLAB as the software became popular. Consequently, the majority of the literature that has been written about MATLAB assumes that the reader has knowledge of computer programming. Books about MATLAB often address advanced topics or applications that are specialized to a particular field. Today, however, MATLAB is being introduced to college students as the first (and often the only) computer program they will learn. For these students there is a need for a book that teaches MATLAB assuming no prior experience in computer programming.

The Purpose of This Book

MATLAB: An Introduction with Applications is intended for students who are using MATLAB for the first time and have little or no experience in computer programming. It can be used as a textbook in freshmen engineering courses or in workshops where MATLAB is being taught. The book can also serve as a reference in more advanced science and engineering courses where MATLAB is used as a tool for solving problems. It also can be used for self-study of MATLAB by students and practicing engineers. In addition, the book can be a supplement or a secondary book in courses where MATLAB is used but the instructor does not have the time to cover it extensively.

Topics Covered

MATLAB is a huge program, and therefore it is impossible to cover all of it in one book. This book focuses primarily on the foundations of MATLAB. The assumption is that once these foundations are well understood, the student will be able to learn advanced topics easily by using the information in the Help menu.

The order in which the topics are presented in this book was chosen carefully, based on several years of experience in teaching MATLAB in an introductory engineering course. The topics are presented in an order that allows the student to follow the book chapter after chapter. Every topic is presented completely in one place and then used in the following chapters.

The first chapter describes the basic structure and features of MATLAB and how to use the program for simple arithmetic operations with scalars as with a calculator. Script files are introduced at the end of the chapter. They allow the student to write, save, and execute simple MATLAB programs. The next two chapters are devoted to the topic of arrays. MATLAB’s basic data element is an array that does not require dimensioning. This concept, which makes MATLAB a very powerful program, can be a little difficult to grasp for students who have only limited knowledge of and experience with linear algebra and vector analysis. The concept of arrays is introduced gradually and then explained in extensive detail. Chapter 2 describes how to create arrays, and Chapter 3 covers mathematical operations with arrays.

Following the basics, more advanced topics that are related to script files and input and output of data are presented in Chapter 4. This is followed by coverage of two-dimensional plotting in Chapter 5. Programming with MATLAB is introduced in Chapter 6. This includes flow control with conditional statements and loops. User-defined functions, anonymous functions, and function functions are covered next in Chapter 7. The coverage of function files (user-defined functions) is intentionally separated from the subject of script files. This has proven to be easier to understand by students who are not familiar with similar concepts from other computer programs.

The next three chapters cover more advanced topics. Chapter 8 describes how MATLAB can be used for carrying out calculations with polynomials, and how to use MATLAB for curve fitting and interpolation. Chapter 9 covers applications of MATLAB in numerical analysis. It includes solving nonlinear equations, finding minimum or a maximum of a function, numerical integration, and solution of first-order ordinary differential equations. Chapter 10 describes how to produce three-dimensional plots, an extension of the chapter on two-dimensional plots. Chapter 11 covers in great detail how to use MATLAB in symbolic operations.

The Framework of a Typical Chapter

In every chapter the topics are introduced gradually in an order that makes the concepts easy to understand. The use of MATLAB is demonstrated extensively within the text and by examples. Some of the longer examples in Chapters 13 are titled as tutorials. Every use of MATLAB is printed with a different font and with a gray background. Additional explanations appear in boxed text with a white background. The idea is that the reader will execute these demonstrations and tutorials in order to gain experience in using MATLAB. In addition, every chapter includes formal sample problems that are examples of applications of MATLAB for solving problems in math, science, and engineering. Each example includes a problem statement and a detailed solution. Some sample problems are presented in the middle of the chapter. All of the chapters (except Chapter 2) have a section at the end with several sample problems of applications. It should be pointed out that problems with MATLAB can be solved in many different ways. The solutions of the sample problems are written such that they are easy to follow. This means that in many cases the problem can be solved by writing a shorter, or sometimes “trickier,” program. The students are encouraged to try to write their own solutions and compare the end results. At the end of each chapter there is a set of homework problems. They include general problems from math and science and problems from different disciplines of engineering.

Symbolic Calculations

MATLAB is essentially a software for numerical calculations. Symbolic math operations, however, can be executed if the Symbolic Math toolbox is installed. The Symbolic Math toolbox is included in the student version of the software and can be added to the standard program.

Software and Hardware

The MATLAB program, like most other software, is continually being developed and new versions are released frequently. This book covers MATLAB Version 8.2.0.701, Release 2013b. It should be emphasized, however, that the book covers the basics of MATLAB, which do not change much from version to version. The book covers the use of MATLAB on computers that use the Windows operating system. Everything is essentially the same when MATLAB is used on other machines. The user is referred to the documentation of MATLAB for details on using MATLAB on other operating systems. It is assumed that the software is installed on the computer, and the user has basic knowledge of operating the computer.

The Order of Topics in the Book

It is probably impossible to write a textbook where all the subjects are presented in an order that is suitable for everyone. The order of topics in this book is such that the fundamentals of MATLAB are covered first (arrays and array operations), and, as mentioned before, every topic is covered completely in one location, which makes the book easy to use as a reference. The order of the topics in this fifth edition is the same as in the previous edition. Programming is introduced before user-defined functions. This allows using programming in user-defined functions. Also, applications of MATLAB in numerical analysis follow Chapter 8 which covers polynomials, curve fitting, and interpolation.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.17.140