Pre-Engineering 220 Introduction to MatLab ® & Scientific Programming j kiefer



Download 8.69 Mb.
Page1/128
Date02.05.2018
Size8.69 Mb.
#47255
  1   2   3   4   5   6   7   8   9   ...   128
Pre-Engineering 220
Introduction to MatLab® &
Scientific Programming
J Kiefer

Gottfried W. Leibnitz:



It is unworthy for excellent men to lose hours like slaves in the labour of calculation which could be safely relegated to anyone else if machines were used.

© 2013

Table of Contents


Table of Contents 1

I. Introduction 3

A. Numerical Methods or Numerical Analysis 3

1. Numerical Analysis 3

2. Newton’s Method for Solving a Nonlinear Equation—an example 3

3. Series 5

4. Error 5

B. Programming 6

1. Program Design 6

2. Branching 6

3. Loops 6

4. I/O 6


5. Precision Issues 7

6. Debugging 7

II. MatLab® 8

A. Program Features 8

1. Commands 8

2. Arrays 10

3. Array Operations 11

B. Files 11

1. m-files 11

2. Script files 12

3. Function files 12

C. Plots 13

1. Two Dimensional Graphs (pp. 133-158 13

2. Three Dimensional Graphs 13

D. Programs 14

1. Branches 14

2. Loops (pp. 190-200) 16

3. Input/output (pp 114-118) 17

III. Numerical Solution of Nonlinear Equations 18

A. Non-Linear Equations—one at a time 18

1. The Problem 18

2. Bisection 18

3. Newton’s Method or the Newton-Raphson Method 19

4. Secant Method 20

5. Hybrid Methods 20

B. Systems of Nonlinear Equations 21

1. Newton-Raphson 21

2. Implicit Iterative Methods 21

IV. Linear Algebra 23

A. Matrix Arithmetic 23

1. Matrices 23

2. Addition & Subtraction 23

3. Multiplication 23

4. Inverse Matrix 24

B. Simultaneous Linear Equations 25

1. The Problem 25

2. Gaussian Elimination 25

3. Matrix Operations 26

4. Gauss-Jordan Elimination 28

C. Iterative Methods 30

1. Jacobi Method 30

2. Gauss-Seidel Method 31

D. Applications 32

1. Electrical Circuit 32

2. Truss System 33

V. Interpolation and Curve Fitting 34

A. Polynomial Interpolation 34

1. Uniqueness 34

2. Newton’s Divided Difference Interpolating Polynomial 35

B. Least Squares Fitting 38

1. Goodness of Fit 38

2. Least Squares Fit to a Polynomial 38

3. Least Squares Fit to Non-polynomial Function 39

MatLab® Sidelight Number One 41

1. Polynomials 41

2. Curve Fitting & Interpolation 41

VI. Integration 43

A. Newton-Cotes Formulæ 43

1. Trapezoid Rule 43

2. Extension to Higher Order Formulæ 44

B. Numerical Integration by Random Sampling 47

1. Random Sampling 47

2. Samples of Random Sampling 48

3. Integration 48

MatLab® Sidelight Number Two 53

1. Nonlinear Equations 53

2. Integration 53

VII. Ordinary Differential Equations 55

A. Linear First Order Equations 55

1. One Step Methods 55

2. Error 56

MatLab® Sidelight Number Three 58

1. First Order Ordinary Differential Equations (ODE) 58

B. Second Order Ordinary Differential Equations 59

1. Reduction to a System of First Order Equations 59

2. Difference Equations 60



I. Introduction




A. Numerical Methods or Numerical Analysis




1. Numerical Analysis

a. Definition



“Concerned with solving mathematical problems by the operations of arithmetic.” That is, we manipulate (, etc.) numerical values rather than derive or manipulate analytical mathematic expressions (, etc.).


Download 8.69 Mb.

Share with your friends:
  1   2   3   4   5   6   7   8   9   ...   128




The database is protected by copyright ©ininet.org 2024
send message

    Main page