You are previewing MATLAB Numerical Calculations.
O'Reilly logo
MATLAB Numerical Calculations

Book Description

MATLAB is a high-level language and environment for numerical computation, visualization, and programming. Using MATLAB, you can analyze data, develop algorithms, and create models and applications. The language, tools, and built-in math functions enable you to explore multiple approaches and reach a solution faster than with spreadsheets or traditional programming languages, such as C/C++ or Java. This book is designed for use as a scientific/business calculator so that you can get numerical solutions to problems involving a wide array of mathematics using MATLAB. Just look up the function you want in the book and you are ready to use it in MATLAB or use the book to learn about the enormous range of options that MATLAB offers.

MATLAB Numerical Calculations focuses on MATLAB capabilities to give you numerical solutions to problems you are likely to encounter in your professional or scholastic life. It introduces you to the MATLAB language with practical hands-on instructions and results, allowing you to quickly achieve your goals. Starting with a look at basic MATLAB functionality with integers, rational numbers and real and complex numbers, and MATLAB's relationship with Maple, you will learn how to solve equations in MATLAB, and how to simplify the results. You will see how MATLAB incorporates vector, matrix and character variables, and functions thereof. MATLAB is a powerful tool used to defined, manipulate and simplify complex algebraic expressions. With MATLAB you can also work with ease in matrix algebra, making use of commands which allow you to find eigenvalues, eigenvectors, determinants, norms and various matrix decompositions, among many other features. Lastly, you will see how you can write scripts and use MATLAB to explore numerical analysis, finding approximations of integrals, derivatives and numerical solutions of differential equations.

Table of Contents

  1. Cover
  2. Title
  3. Copyright
  4. Contents at a Glance
  5. Contents
  6. About the Author
  7. Also Available
  8. Introduction
  9. Chapter 1: Introduction to MATLAB
    1. 1.1 Numerical Calculations with MATLAB
    2. 1.2 Symbolic Calculations with MATLAB
    3. 1.3 MATLAB and Maple
    4. 1.4 General Notation. The Command Window
    5. 1.5 MATLAB and Programming
    6. 1.6 Translating C, FORTRAN and TEX expressions
  10. Chapter 2: Integers, Divisibility and Number Systems
    1. 2.1 Arithmetic Operations in MATLAB
    2. 2.2 Integers
    3. 2.3 Divisibility
    4. 2.4 Modular Arithmetic
    5. 2.5 Divisibility in Z[√n]
    6. 2.6 Diophantine Equations
    7. 2.7 Number Systems
  11. Chapter 3: Real and Complex Numbers
    1. 3.1 Rational Numbers
    2. 3.2 Continued Fractions
    3. 3.3 Irrational Numbers
    4. 3.4 Algebraic Numbers
    5. 3.5 Real Numbers
    6. 3.6 Common Functions with Real Arguments
    7. 3.7 Complex Numbers
    8. 3.8 Common Functions with Complex Arguments
    9. 3.9 Divisibility in the Complex Field. The Ring of Gaussian Integers
    10. 3.10 Approximation and Precision
    11. 3.11 Types of Numbers and Expressions
    12. 3.12 Random Numbers
  12. Chapter 4: Numerical Variables, Vectors and Matrices
    1. 4.1 Variables
    2. 4.2 Variables and Special Constants
    3. 4.3 Symbolic and Numeric Variables
    4. 4.4 Vector Variables
    5. 4.5 Matrix Variables
    6. 4.6 Character Variables
    7. 4.7 Operators
      1. 4.7.1 Arithmetic Operators
      2. 4.7.2 Relational Operators
      3. 4.7.3 Logical Operators
    8. 4.8 Logic Functions
    9. 4.9 Elementary Functions that Support Complex Matrix Arguments
    10. 4.10 Elementary Functions that Support Complex Vector Arguments
    11. 4.11 Vector Functions of Several Variables
    12. 4.12 Functions of One Variable
  13. Chapter 5: Vectors and Matrices
    1. 5.1 Vectors and Matrices
    2. 5.2 Operations with Numeric Matrices
    3. 5.3 Eigenvalues and Eigenvectors
    4. 5.4 Matrix Decomposition
    5. 5.5 Similar Matrices and Diagonalization
    6. 5.6 Sparse Matrices
    7. 5.7 Special Matrices
  14. Chapter 6: Functions
    1. 6.1 Custom Defined Functions
    2. 6.2 Functions and M-files
    3. 6.3 Functions and Flow Control. Loops
    4. 6.4 The FOR loop
    5. 6.5 The WHILE loop
    6. 6.6 IF ELSEIF ELSE END LOOP
    7. 6.7 Recursive Functions
    8. 6.8 Conditional Functions
    9. 6.9 Defining Functions Directly. Evaluating Functions
    10. 6.10 Functions of One Variable
    11. 6.11 Functions of Several Variables
    12. 6.12 Piecewise Functions
    13. 6.13 Functional Operations
  15. Chapter 7: Programming and Numerical Analysis
    1. 7.1 MATLAB and Programming
    2. 7.2 The Text Editor
    3. 7.3 Scripts
    4. 7.4 Functions and M-files. Eval and feval
      1. 7.4.1 A Simple Function Definition
    5. 7.5 Local and Global Variables
    6. 7.6 Data Types
    7. 7.7 Flow Control: FOR, WHILE and IF ELSEIF Loops
    8. 7.8 FOR Loops
    9. 7.9 WHILE Loops
    10. 7.10 IF ELSEIF ELSE END Loops
    11. 7.11 SWITCH and CASE
    12. 7.12 CONTINUE
    13. 7.13 BREAK
    14. 7.14 TRY ... CATCH
    15. 7.15 RETURN
    16. 7.16 Subfunctions
    17. 7.17 Commands in M-files
    18. 7.18 Functions relating to Arrays of Cells
    19. 7.19 Functions of Multidimensional Arrays
    20. 7.20 Numerical Analysis Methods in MATLAB
    21. 7.21 Zeros of Functions and Optimization
    22. 7.22 Numerical Integration
    23. 7.23 Numerical Differentiation
    24. 7.24 Approximate Solutions of Differential Equations
    25. 7.25 Ordinary Differential Equations with Initial Values
    26. 7.26 Ordinary Differential Equations with Boundary Conditions
    27. 7.27 Partial Differential Equations
  16. Chapter 8: Numerical Algorithms: Equations, Derivatives, Integrals and Differential Equations
    1. 8.1 Solving Non-Linear Equations
      1. 8.1.1 The Fixed Point Method for Solving x = g(x)
      2. 8.1.2 Newton’s Method for Solving the Equation f(x) = 0
      3. 8.1.3 Schröder’s Method for Solving the Equation f(x)=0
    2. 8.2 Systems of Non-Linear Equations
      1. 8.2.1 The Seidel Method
      2. 8.2.2 The Newton-Raphson Method
    3. 8.3 Interpolation Methods
      1. 8.3.1 Lagrange Polynomial Interpolation
      2. 8.3.2 Newton Polynomial Interpolation
    4. 8.4 Numerical Derivation Methods
      1. 8.4.1 Numerical Derivation via Limits
      2. 8.4.2 Richardson’s Extrapolation Method
      3. 8.4.3 Derivation Using Interpolation (n + 1 Nodes)
    5. 8.5 Numerical Integration Methods
      1. 8.5.1 The Trapezium Method
      2. 8.5.2 Simpson’s Method
    6. 8.6 Ordinary Differential Equations
      1. 8.6.1 Euler’s Method
      2. 8.6.2 Heun’s Method
      3. 8.6.3 The Taylor Series Method