Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Could someone give me an example of this for matlab code? Currently having issues and it would help to see something similar like an example.

image text in transcribed

Could someone give me an example of this for matlab code? Currently having issues and it would help to see something similar like an example. Thanks.

ZER2 Write a function M-file to solve min f(x) by the exact gradient descent method, where 1 f(x) = T'A. and A is one of the following SPD matrices 92 [21 8 [41 187 8 9 18 14 (This is a strictly convex problem, the minimizer is z* = 0 and the minimum is 0.) The first line of your M-file should read function (x,min, err,iter] = ExactGradient_ (x0, tol,N,A) The sub-functions that compute the gradient descent direction and f(x + a) are as follows. function p=GD (x) P=-A*x; end function y=f(x,p, alpha) z=x+alpha*p; y=.5*Z'*A*z; end Use the initial guess 21 x0 and set N to be 200 and the tolerance to be 10-10 in your computations

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_2

Step: 3

blur-text-image_3

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

Filing And Computer Database Projects

Authors: Jeffrey Stewart

2nd Edition

007822781X, 9780078227813

More Books

Students also viewed these Databases questions