| |
| |
Preface | |
| |
| |
| |
Introduction | |
| |
| |
| |
What Is MATLAB? | |
| |
| |
| |
Does MATLAB Do Symbolic Calculations? | |
| |
| |
| |
Will MATLAB Run on My Computer? | |
| |
| |
| |
Where Do I Get MATLAB ? | |
| |
| |
| |
How Do I Use This Book? | |
| |
| |
| |
Basics of MATLAB | |
| |
| |
| |
MATLAB windows | |
| |
| |
| |
On-line help | |
| |
| |
| |
Input-output | |
| |
| |
| |
File types | |
| |
| |
| |
Platform dependence | |
| |
| |
| |
General commands you should remember | |
| |
| |
| |
Visit This Again | |
| |
| |
| |
Tutorial Lessons The Basics | |
| |
| |
| |
Lesson 1: A Minimum MATLAB Session | |
| |
| |
| |
Lesson 2: Creating and Working with Arrays of Numbers | |
| |
| |
| |
Lesson 3: Creating and Printing Simple Plots | |
| |
| |
| |
Lesson 4: Creating, Saving, and Executing a Script File | |
| |
| |
| |
Lesson 5: Creating and Executing a Function File Directional Explorations | |
| |
| |
| |
Lesson 6: Working with Arrays and Matrices | |
| |
| |
| |
Lesson 7: Working with anonymous functions | |
| |
| |
| |
Lesson 8: Symbolic Computation | |
| |
| |
| |
Lesson 9: Importing and Exporting Data | |
| |
| |
| |
Lesson 10: Working with Files and Directories | |
| |
| |
| |
Lesson 11: Publishing Reports | |
| |
| |
| |
Interactive Computation 67 | |
| |
| |
| |
Matrices and Vectors | |
| |
| |
| |
Input | |
| |
| |
| |
Indexing (or subscripting) | |
| |
| |
| |
Matrix manipulation | |
| |
| |
| |
Creating vectors | |
| |
| |
| |
Matrix and Array Operations | |
| |
| |
| |
Arithmetic operations | |
| |
| |
| |
Relational operations | |
| |
| |
| |
Logical operations | |
| |
| |
| |
Elementary math functions | |
| |
| |
| |
Matrix functions | |
| |
| |
| |
Character strings | |
| |
| |
| |
Manipulating character strings | |
| |
| |
| |
The eval function | |
| |
| |
| |
A Special Note on Array Operations | |
| |
| |
| |
Vectorization | |
| |
| |
| |
Command Line Functions | |
| |
| |
| |
Inline functions | |
| |
| |
| |
Anonymous functions | |
| |
| |
| |
Using Built-in Functions and On-line Help | |
| |
| |
| |
Example 1: Finding the determinant of a matrix | |
| |
| |
| |
Example 2: Finding eigenvalues and eigenvectors | |
| |
| |
| |
Saving and Loading Data | |
| |
| |
| |
Saving into and loading from the binary Mat-_les | |
| |
| |
| |
Importing data _les | |
| |
| |
| |
Recording a session with diary | |
| |
| |
| |
Plotting Simple Graphs | |
| |
| |
| |
Programming in MATLAB: Scripts and Functions | |
| |
| |
| |
Script Files | |
| |
| |
| |
Function Files | |
| |
| |
| |
Executing a function | |
| |
| |
| |
More on functions | |
| |
| |
| |
M-Lint code analyzer | |
| |
| |
| |
Subfunctions | |
| |
| |
| |
Nested functions | |
| |
| |
| |
Compiled (parsed) functions: The p-code | |
| |
| |
| |
The pro_ler | |
| |
| |
| |
Language-speci_c Features | |
| |
| |
| |
Use of comments to create on-line help | |
| |
| |
| |
Continuation | |
| |
| |
| |
Global variables | |
| |
| |
| |
Loops, branches, and control-ow | |
| |
| |
| |
Interactive input | |
| |
| |
| |
Recursion | |
| |
| |
| |
Input/output | |
| |
| |
| |
Advanced Data Objects | |
| |
| |
| |
Multidimensional matrices | |
| |
| |
| |
Structures | |
| |
| |
| |
Cells | |
| |
| |
| |
Publishing Reports | |
| |
| |
| |
Applications | |
| |
| |
| |
Linear Algebra | |
| |
| |
| |
Solving a linear system | |
| |
| |
| |
Gaussian elimination | |
| |
| |
| |
Finding eigenvalues and eigenvectors | |
| |
| |
| |
Matrix factorizations | |
| |
| |
| |
Advanced topics | |
| |
| |
| |
Curve Fitting and Interpolation | |
| |
| |
| |
Polynomial curve _tting on the y | |
| |
| |
| |
Do it yourself: Curve _tting with polynomial functions | |
| |
| |
| |
Least squares curve _tting | |
| |
| |
| |
General nonlinear _ts | |
| |
| |
| |
Interpolation | |
| |
| |
| |
Data Analysis and Statistics | |
| |
| |
| |
Numerical Integration (Quadrature) | |
| |
| |
| |
Double integration | |
| |
| |
| |
Ordinary Di_erential Equations | |
| |
| |
| |
Example 1: A _rst-order linear ODE | |
| |
| |
| |
Example 2: A second-order nonlinear ODE | |
| |
| |
| |
ode23 versus ode45 | |
| |
| |
| |
Specifying tolerance | |
| |
| |
| |
The ODE suite | |
| |
| |
| |
Event location | |
| |
| |
| |
Nonlinear Algebraic Equations | |
| |
| |
| |
Roots of polynomials | |
| |
| |
| |
Advanced Topics | |
| |
| |
| |
Graphics | |
| |
| |
| |
Basic 2-D Plots | |
| |
| |
| |
Style options | |
| |
| |
| |
Labels, title, legend, and other text objects | |
| |
| |
| |
Axis control, zoom in, and zoom out | |
| |
| |
| |
Modifying plots with the plot editor | |
| |
| |
| |
Overlay plots | |
| |
| |
| |
Specialized 2-D plots | |
| |
| |
| |
Using subplot for Multiple Graphs | |
| |
| |
| |
3-D Plots | |
| |
| |
| |
View | |
| |
| |
| |
Rotate view | |
| |
| |
| |
Mesh and surface plots | |
| |
| |
| |
Vector _eld and volumetric plots | |
| |
| |
| |
Interpolated surface plots | |
| |
| |
| |
Handle Graphics | |
| |
| |
| |
The object hierarchy | |
| |
| |
| |
Object handles | |
| |
| |
| |
Object properties | |
| |
| |
| |
Modifying an existing plot | |
| |
| |
| |
Complete control over the graphics layout | |
| |
| |
| |
Fun with 3-D Surface Graphics | |
| |
| |
| |
Generating a cylindrical surface | |
| |
| |
| |
Face color, transparency and light reection | |
| |
| |
| |
A little more fun with color and lighting | |
| |
| |
| |
A word about choosing colors | |
| |
| |
| |
Saving and Printing Graphs | |
| |
| |
| |
Saving graphs to reusable _les | |
| |
| |
| |
Animation | |
| |
| |
| |
Errors | |
| |
| |
| |
Computer Algebra and The Symbolic Math Toolbox | |
| |
| |
| |
The Symbolic Math Toolbox | |
| |
| |
| |
Should you buy it? | |
| |
| |
| |
Two useful tools in the Symbolic Math Toolbox | |
| |
| |
| |
Numeric vs. symbolic computation | |
| |
| |
| |
Variable Precision Arithmetic | |
| |
| |
| |
Getting help with the Symbolic Math Toolbox | |
| |
| |
| |
Using the Symbolic Math Toolbox | |
| |
| |
| |
Basic manipulations | |
| |
| |
| |
Talking to itself | |
| |
| |
| |
Generating MATLAB code for an inline or anonymous function | |
| |
| |
| |
Generating M-_les from symbolic expressions | |
| |
| |
| |
Using MuPAD Notebook | |
| |
| |
| |
Graphics and animation | |
| |
| |
| |
Summary: Some Symbolic Math Toolbox commands | |
| |
| |
| |
Honorable Mentions | |
| |
| |
| |
Debugging Tools | |
| |
| |
| |
External Interface: Mex-_les | |
| |
| |
| |
Graphical User Interface | |
| |
| |
| |
The MATLAB Language Reference | |
| |
| |
| |
Punctuation Marks and Other Symbols | |
| |
| |
| |
General-purpose Commands | |
| |
| |
| |
Special Variables and Constants | |
| |
| |
| |
Language Constructs and Debugging | |
| |
| |
| |
File Input/Output | |
| |
| |
| |
Operators and Logical Functions | |
| |
| |
| |
Frequently Used Math Functions | |
| |
| |
| |
Matrices: Creation and Manipulation | |
| |
| |
| |
Character String Functions | |
| |
| |
| |
Graphics Functions | |
| |
| |
| |
Some Applications Functions | |
| |
| |
| |
Data analysis and Fourier transforms | |
| |
| |
| |
Polynomials and data interpolation | |
| |
| |
| |
Nonlinear numerical methods | |
| |
| |
Bibliography | |
| |
| |
Index | |