You are previewing Numerical Methods using MATLAB.
O'Reilly logo
Numerical Methods using MATLAB

Book Description

Numerical Methods with MATLAB provides a highly-practical reference work to assist anyone working with numerical methods. A wide range of techniques are introduced, their merits discussed and fully working MATLAB code samples supplied to demonstrate how they can be coded and applied.

Numerical methods have wide applicability across many scientific, mathematical, and engineering disciplines and are most often employed in situations where working out an exact answer to the problem by another method is impractical.

Numerical Methods with MATLAB presents each topic in a concise and readable format to help you learn fast and effectively. It is not intended to be a reference work to the conceptual theory that underpins the numerical methods themselves. A wide range of reference works are readily available to supply this information. If, however, you want assistance in applying numerical methods then this is the book for you.

Table of Contents

  1. Cover
  2. Title
  3. Copyright
  4. Dedication
  5. Contents at a Glance
  6. Contents
  7. About the Author
  8. Acknowledgments
  9. Introduction
  10. Chapter 1: Introduction to MATLAB
    1. Introduction
    2. Interface
      1. Command Window
      2. Current Directory
      3. Workspace
      4. Figures
      5. Command History
      6. Editor
      7. Help Browser
    3. Getting Started
      1. Creating a Matrix
    4. Functions
      1. The Difference Between Functions and Scripts
      2. Special Matrices
    5. Other Variable Types
      1. Character Variables
      2. Cells
      3. Logical Variables
      4. Structures
    6. Saving/Loading Variables
    7. Plots
  11. Chapter 2: Matrix Representation, Operations and Vectorization
    1. Matrix Representation
      1. Conventional Sense: Matrices
      2. Data Sense: Arrays
      3. Model Representation
    2. Operations
      1. Matrix Operations
      2. Dot (array) Operators
      3. Operations for Models
    3. Indexing
      1. Normal Indexing
      2. Linear Indexing
      3. Logical Indexing
    4. Vectorization
      1. Example 1. Creating C such that C(i,j)=A(i)^B(j)
      2. Example 2. Calculating the Sum of Harmonics
      3. Example 3. Conversion to Matrix Operations
      4. Example 4. Selective Inversion
    5. Tips for Performance Improvement
      1. Vectorization
      2. Preallocating Arrays
      3. Fixed Type Variables
  12. Chapter 3: Numerical Techniques
    1. Differentiation
      1. Partial Differentiation
      2. Computing Higher Derivatives
    2. Integration
      1. Multi-dimensional Integration
      2. Integration Over an Infinite Range
      3. Multidimensional Integration over Non-rectangular Intervals
    3. Solving Equations
      1. Polynomial Functions
      2. Zeros of a General Function
    4. Interpolation
      1. One-dimensional Interpolation
      2. Data Fitting and Polynomial Interpolation
      3. Arbitrary Interpolation
  13. Chapter 4: Visualization
    1. Line Plots
      1. Plot Options
      2. Multiple Plots
      3. Annotations
      4. Handles
    2. 2D plots
    3. Quiver Plots
    4. 3D Plots
    5. Animations
      1. A Clock Animation
      2. Wave Motion
    6. Movies
  14. Chapter 5: Introduction to Simulation
    1. One Step Simulations
    2. Iterative Methods
    3. Simulation of Real World Processes
      1. Discrete Processes
      2. Simulation of Continuous Time Processes
    4. Example: Balls in a 2D Box
      1. Animation
      2. Motion in a Force Field
    5. Event-based Simulations
  15. Chapter 6: Monte Carlo Simulations
    1. Random Sampling
      1. The Third Moment of a Gaussian Random Variable
      2. Moments of Random Processes
    2. Sampling from a Given Distribution
      1. Inbuilt Functions
      2. Rejection Sampling
      3. Gibbs Sampling
    3. Statistical Performance
      1. Computation of pi
      2. Communication Channels
      3. Birth-Death Processes
    4. Multidimensional Integrals
    5. Summary
  16. Chapter 7: Optimization
    1. Optimization Overview
      1. The Optimization Goal
      2. Design Parameters
      3. Constraints
      4. The Optimization Domain
      5. The Optimization Problem
      6. Mathematical Approach
    2. Implementation
      1. Extensive Search
      2. The Gradient Descent Method
    3. Built-in Functions in MATLAB
      1. Defining an Objective Function
      2. Defining Constraints
      3. Optimization Options
      4. Problem Structures
      5. Output Format
      6. Minimization Problems
      7. Equation Solving
    4. Summary
  17. Chapter 8: Evolutionary Computations
    1. The Rastrigin Function
    2. Particle Swarm Optimization
      1. Algorithm
      2. Implementation
      3. Example
    3. The Genetic Algorithm
      1. Representation
      2. Initialization
      3. Selection
      4. Crossover
      5. Mutation
      6. New Generation
      7. Store the Best Chromosome of the Generation
      8. Termination Conditions
      9. Iterations
      10. Output
      11. Function Definition
      12. Example
      13. The Inbuilt Function ga
    4. Summary
  18. Chapter 9: Regression and Model Fitting
    1. Regression
      1. Linear Regression
      2. Nonlinear Regression
      3. Generalized Linear Regression
    2. Time Series Analysis
      1. Autocorrelation and Proposing Models
      2. Regression
      3. Forecasting
    3. Neural Networks
      1. Feedforward Networks
    4. Summary
  19. Chapter 10: Differential Equations and System Dynamics
    1. Differential Equations
      1. Ordinary Differential Equations
      2. Partial Differential Equations
    2. System Dynamics
      1. Simulation of the System
    3. Summary
  20. Index