Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

( 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.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases DeMYSTiFieD

Authors: Andy Oppel

2nd Edition

0071747990, 978-0071747998

More Books

Students also viewed these Databases questions