This preview shows pages 1–4. Sign up to view the full content.
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 cinnawu@math.berkeley.edu 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 Newtons method to compute 5 Numerical solution of ODE/PDE Solving linear systems, finding eigenvalues, etc. Computing 5 with Newtons method Last time We approximated the 5 by computing the n th iterate of the Newtons method: x n +1 = x n 2 + 5 2 x n ,x given. However we didnt 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
 Spring '08
 Instuctor
 matlab

Click to edit the document details