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, 21.06.2019 22:00
Determine which of the four levels of measurement (nominal, ordinal, interval, ratio) is most appropriate for the data below. internet speed levels of "fast comma " "medium comma " and "slow" choose the correct answer below. a. the ordinal level of measurement is most appropriate because the data can be ordered comma but differences left parenthesis obtained by subtraction right parenthesis cannot be found or are meaningless. nothing nothing nothing nothing nothing b. the interval level of measurement is most appropriate because the data can be ordered comma differences left parenthesis obtained by subtraction right parenthesis can be found and are meaningful comma and there is no natural starting point. c. the nominal level of measurement is most appropriate because the data cannot be ordered. nothing d. the ratio level of measurement is most appropriate because the data can be ordered comma differences left parenthesis obtained by subtraction right parenthesis can be found and are meaningful comma and there is a natural starting point.
Answers: 2
question
Computers and Technology, 22.06.2019 21:00
So im doing this school challenge and the teachers said whats the average text a student gets a day so i need to get about 20 in a day but dont know how can you guys 2163371293
Answers: 2
question
Computers and Technology, 23.06.2019 20:40
Instruction active describing list features which statements accurately describe the features of word that are used to create lists? check all that apply. the tab key can be used to create a sublist. the enter key can be used to add an item to a list. the numbering feature allows for the use of letters in a list. the numbering feature can change the numbers to bullets in a list. the multilevel list feature provides options for different levels in a list.
Answers: 2
question
Computers and Technology, 24.06.2019 07:30
Consider the folloeing website url: what does the "http: //" represent? a. protocal identifier. b. ftp. c. domain name d. resource name
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
Mathematics, 26.01.2021 19:50
question
Mathematics, 26.01.2021 19:50
question
Mathematics, 26.01.2021 19:50
question
Chemistry, 26.01.2021 19:50