There is a summary of the commands at the beginning of each section This summary is followed by more detailed explanations of the commands, illustrative examples and programs.
Heavy stock paper-useful for making notes-separates the chapters. Page numbering starts again in each chapter. There are further note pages before chapter 1 and at the end of the book.
Many of files that appear in this book can be found at:
mathstat.carleton.ca / ~rhfischl / matlab.html /
Using MATLAB with windows, UNIX, DOS i
I. 1 A sample MATLAB session 1
Basics of MATLAB: starting, quitting, entering matrices, "diaries", lists of variables, clearing, executing system commands while in MATLAB
I.2 Five special symbols [ ] ( ) ; , : 7
I.3 Programs, simple loops and functions 12
- Creating and importing program and data files
- Pauses
- "For-loops"
- Creating and using your own functions
I.4 Advanced importing and exporting of data techniques 22
- Importing data from a file
- Long lines of data
- Importing data from the keyboard; using the input function
- Saving variables to ".mat" files
- Reloading variables from ".mat" files
- Saving one variable in ASCII format
I.5 Formatting the output; tables 28
- Using the disp command; tables
- The number of decimal places in the output
II.1 Basic MATLAB matrix and pointwise operations 1
- Transpose
- Addition
- Multiplication iv. Powers
- Element by element multiplication
- Element by element division
- Exponential type (pointwise and matrix)
II.2 Six special matrices 6
- dentity matrix
- matrix of ones
- matrix of zeros
- matrix of random elements
- row vectors of indices
- Empty matrix
II.3 Common MATLAB functions 13
- Linear algebra
- Matrix manipulations
- Pi, roots, complex numbers, zeros of polynomials
- Summing, maximum etc.
- Real and imaginary parts etc.
- Rounding the answer etc.
- Exponential type functions
- Trigonometric functions
- Timing
II.4 Extracting and Building Matrices 30
- Building matrices from vectors
- Extracting rows and columns from matrices
- Extracting several rows or columns
- Replacing a column or row by a vector
- Building matrices from submatrices
- Replacing a block of a matrix by a given matrix
- Building matrices recursively by assignment and by concatenation; the empty matrix: [ ]
- Storing and "fetching" sequences of matrices
- Building a diagonal matrix from a vector
- Building matrices with many zeros
- Forming a vector from the elements of a matrix
II.5 Matrix column operations (summing etc.) and sorting 44
Column functions.
SortingII.6 Graphing vectors and matrices 49
II.7 Numerical Analysis 68
- Defining functions
- Finding the roots of a polynomial
- Finding the roots of a defined function
- Finding the maximum and minimum of a function
- Finding the definite integral of a function
- Plotting defined functions
- Curve Fitting
- Estimating Values /Interpolation
II.8 Logical operators and advanced programming 76
- Relational symbols
- Logical operators
- Conditional loops
- Breaking out of a program; error statements
- "While loops"
- Breaking out of loops
- Conditional vectors and matrices
- Testing conditions with any and all
- Finding indices corresponding to a condition
- An illustrative example: four methods
III.1 Linear equations 1
- General systems
- An infinite number of parametric solutions
- No solutions
- Cramer's rule
- Inverse
- Using the division operator; "LU decompositions"
- Large systems of equations
- Linear independence
III.2 Eigenvalues and eigenvectors 14
- Right eigenvectors and eigenvalues
- Left eigenvectors and eigenvalues
- Spectral decompositions
III.3 Matrix power models 22
Editorial Conventions
Web Site Training provided by Kathryn Charis Apunen Washburn summer 2001