This preview shows pages 1–3. Sign up to view the full content.
EE103, Winter 2009, HW 5 Solution, SEJ Page 1 / 8 Applied Numerical Computing Instructor: Prof. S. E. Jacobsen HW5 Solution Students: Distributed HW solutions are a component of the course and should be fully understood. SEJ Prob 1 (a)- When using Newton’s method to solve the non-linear least squares problem, we have the following: For the code, NewtonMin.m, the Newton update is: 1xkkkxdα+=+, where kdis the direction found by solving FH dF= ∇, and the step-size, kα, is determined by a “back-tracking ½” strategy (Peruse the code). The Hessian is 1()()()()imTFffifiHJx Jxfx Hx=⎛⎞=+⎜⎟⎝⎠∑To find()ifHx, 222221212210(,)iiiiiix ux ux uiiifx ux uiiu efxxex u eHu ex u e−−−−−⎡⎤−⎡⎤∇=−⇒=⎢⎥⎣⎦−⎣⎦In problem 3 of HW#4 we wrote the lines of code that would compute the Jacobian. Here we will use it to findFH. function[J] = hw4p3jac(x,u,v)for k=1:length(u)J(k,:)=[exp(-x(2)*u(k)), -x(1)*u(k)*exp(-x(2)*u(k))];end and, to find FH: function H = hw4p3hes(x,u,v,f,J)H=J'*J;for i=1:length(u)
This preview
has intentionally blurred sections.
Sign up to view the full version.