HW5 Sol - EE103 Winter 2009 HW 5 Solution Applied Numerical...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
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: 1 x k k k x d α + = + , where k d is the direction found by solving F H d F = ∇ , and the step-size, k α , is determined by a “back-tracking ½” strategy (Peruse the code). The Hessian is 1 ( ) ( ) ( ) ( ) i m T F f f i f i H J x J x f x H x = = + To find ( ) i f H x , 2 2 2 2 2 1 2 1 2 2 1 0 ( , ) i i i i i i x u x u x u i i i f x u x u i i u e f x x e x u e H u e x 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 find F H . 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 F H : function H = hw4p3hes(x,u,v,f,J) H=J'*J; for i=1:length(u)
Image of page 1

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

View Full Document Right Arrow Icon