Question: ( 3 ) Write a Matlab routine for implementing the steepest descent method. ( The routine should be written from scratch you to write a
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" 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 :
Terminate the algorithm when If the number of iterations exceeds
terminate it regardless of the norm of the gradient. Initialize the input vector of the first
iteration as
B Plot the error as 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.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
