Question: This is a matlab coding question. Could someone please show me the similar code for this? Like the same process but different numbers for the

 This is a matlab coding question. Could someone please show me

This is a matlab coding question.

Could someone please show me the similar code for this? Like the same process but different numbers for the variables? Currently running into alot of bugs when trying to use the value X0 correctly with the matrix.

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

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!