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

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

View Full Document Right Arrow Icon
Lecture 7: Basic Plotting in MATLAB Department of Mathematics University of California, Berkeley Math 98 Introduction to MATLAB programming
Background image of page 1

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

View Full DocumentRight Arrow Icon
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)
Background image of page 2
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.
Background image of page 3

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

View Full DocumentRight Arrow Icon
Image of page 4
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 Right Arrow Icon
Ask a homework question - tutors are online