subject

In this problem you will do some further experiments with contour. Recall the steepest descent algorithm you programmed in Assignment 3. There, we had used the steepest descent algorithm to solve the following optimization problem (iteratively): minXER2 f(x) = 1/2 xT Ax - xTb
Now we want to plot the path taken by the iterates of the algorithm over the contour plot of f(x). The function showPath. m which you can download from course webpage does this; this function has the following header:
showPath(A, B,XVals)
Here A and b characterize (1), and the matrix XVals contains the iterates of the steepest descent algorithm as its rows; that is XVals looks like the following
XVals =
-3.0000 -2.0000
-1.3589 -0.1245
-0.3634 -0.9956
0.0414 -0.5329
0.2870 -0.7478
First, you need to revise your steepest descent routine so that the iterates of the algorithm are stored as rows of the matrix XVals. Then, revise the function header to have XVals as another output:
function [x F it XVals] = steep(x0, A, b, itmax)
Then, you can use showPath to plot the path taken by the iterates. Run your tests on the following problem.
A = [2 0 2 6], b = [1 4], x0 = [-3 -2]
Your result at this point should like Figure 1.
Once you have everything working, revise showPath by having more contour lines and having the contour lines labeled (using clabel). Submit the revised steep and showPath functions and your final plot.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:40
Pthreads programming: create and terminate a thread write a c++ program that creates a thread. the main will display a message “hello world from the main”. the main will create a thread that will display a message “hello world from the thread” and then terminates with a call to pthread_exit()
Answers: 3
question
Computers and Technology, 22.06.2019 16:00
If a client wants to make minor edits, what should he/she use?
Answers: 3
question
Computers and Technology, 23.06.2019 02:00
Which demographic challenge is europe currently experiencing? a. an aging and decreasing population b. a baby boomc. an unequal distribution between males and females d. a large group of teenagers moving through the school system(i chose a but i'm unsure)
Answers: 1
question
Computers and Technology, 23.06.2019 02:30
Research data that is presented using descriptive language is said to be
Answers: 2
You know the right answer?
In this problem you will do some further experiments with contour. Recall the steepest descent algor...
Questions
question
English, 01.07.2019 16:30
question
Computers and Technology, 01.07.2019 16:30
question
English, 01.07.2019 16:30
Questions on the website: 13722361