Lecture7

# Lecture7 - Lecture 7: Basic Plotting in MATLAB Department...

This preview shows pages 1–4. Sign up to view the full content.

Lecture 7: Basic Plotting in MATLAB Department of Mathematics University of California, Berkeley Math 98 Introduction to MATLAB programming

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Iterates of Newton’s method Iterates of approximations to 5 By Newton’s method, we have x n +1 = x n 2 + 5 2 x n , x 0 > 0 as an approximation to 5 . Let’s plot the sequence of iterates x n , and the error approximations | x n - x n - 1 | , | x 2 n - 5 | . How do we do this? Let’s use NewtonAlg5 to compute the iterates x 1 ,...,x N and use the plot command to plot the above quantities: >> figure(100); >> allSqrtFive=sqrt(5)*ones(1,11); >> plot(1:11, NewtAlg(3,10), ’o’,1:11, . .. allSqrtFive, ,’MarkerFaceColor’,’r’, . .. ’MarkerSize’,14)
Quadratic convergence Quadratic convergence of Newton’s method For the sequence x n above, its provable that | x n - 5 | / | x n - 1 - 5 | 2 approaches a constant, as n → ∞ . This is a special case of the quadratic convergence of Newton’s method. Let’s graph this.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 01/21/2012 for the course MATH 98 taught by Professor Instuctor during the Spring '08 term at Berkeley.

### Page1 / 6

Lecture7 - Lecture 7: Basic Plotting in MATLAB Department...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online