Question: Problem 2 : Write a MATLAB script called hw 4 _ p 2 a . m to use the gradient - descent method to minimize

Problem 2: Write a MATLAB script called hw4_p2a.m to use the gradient-descent method to
minimize f(x)=30x12+30x22. Then write a MATLAB script called hw4_p2b.m to
minimize f(x)=30x12+x22. For each script, use x(0)=[420,68]T as the starting point
and ||gradf(x)||10-6 as the stopping criterion.
Notation note: x(0) denotes the initial x vector (bold to denote vector; 0 to denote
iteration number). Do not confuse this with xi(a scalar), which denotes an individual
component (the ith one) of the vector, x.
Discuss your results: Why did the algorithm work better for one function and worse
for the other?
Hint: We talked about it in class.
5 bonus points: Plot the trajectories of your iterates in the x1-x2 plane (with lines
and line markers).
 Problem 2: Write a MATLAB script called hw4_p2a.m to use the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!