This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Lecture 3: Manipulating Arrays Cinna (seena) Wu [email protected] Modified from slides by Ryan Hynd Department of Mathematics University of California, Berkeley Math 98 Introduction to MATLAB programming Arrays are important! Three fundamental contexts in which arrays arise... Saving a sequence of values of a runtime variable for subsequent retrieval and analysis Representing mathematical functions (scalar and vectorvalued) Matrix algebra ...respective examples Using Newton’s method to compute √ 5 Numerical solution of ODE/PDE Solving linear systems, finding eigenvalues, etc. Computing √ 5 with Newton’s method Last time We approximated the √ 5 by computing the n th iterate of the Newton’s method: x n +1 = x n 2 + 5 2 x n ,x given. However we didn’t save the iterates as we calculated. (SEE http://math.berkeley.edu/ ryanhynd/NewtonAlg2.m) This time We want to save the iterates x 1 ,x 2 ,...,x n so we can analyze  x 1 x  ,  x 2 x 1  ,...,  x n x n 1  and  x 2 1 5  ,  x 2 2 5 ...
View
Full
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.
 Spring '08
 Instuctor
 matlab

Click to edit the document details