Question: ( 3 ) Write a Matlab routine for implementing the steepest descent method. ( The routine should be written from scratch you to write a

(3) Write a Matlab routine for implementing the steepest descent method. (The routine should
be written from scratch
you to write a generalized function that works for any function to optimize. Its inputs could be
"initial vector" x(0) and the function to be optimized, and outputs can be the optimal values and
error through iterations.)
Your routine should be able to find the minimum of a function with multiple variables using the
following step size methods:
i) constant step size
ii) variable step size
iii) quadratic fitting
(A) Execute your routine for minimizing Rosenbrock function :
f(x1,x2)=100(x12-x2)2+(x1-1)2
Terminate the algorithm when ||gradf||0.01. If the number of iterations exceeds 15000,
terminate it regardless of the norm of the gradient. Initialize the input vector of the first
iteration as x(0)=[35].
(B) Plot the error as ||gradf|| with respect to the iteration number for each step size methods. ,
(C) Compare the convergence rates, computation times, final error and final iteration number
for each method in a neat Table. Give your brief comments.
 (3) Write a Matlab routine for implementing the steepest descent method.

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!