Name Math 2243 (S. Kersey, Spring 2018) Homework Project 2 (due date: March 27,
ID: 3197322 • Letter: N
Question
Name Math 2243 (S. Kersey, Spring 2018) Homework Project 2 (due date: March 27, 2018) Min/Max of Multivarate functions Problem Statement: The graph of a multivariate function is plotted below. There are two local maxima and one minima on the graph plotted over [-0.5, 1] x (-0.5,1). In this project you will apply concepts on the gradient you learned in class to determine paths of steepest descent and ascent in identifying local minima or maxima of this function. You will also use an optimization solver i Matlab to compute these min and max. Carry out the following: Print out the file "proj.contour.levels.pdf" from Folio. Starting from each of the six dots, trace the path of the gradient flow. Identify which are ascent and which are descent, and which converge to a min or max. . The following Matlab code is posted on folio in the file p2.m. format compact, format long, clc f-e (x) franke (x (1) , x (2) ) ; [x,z] -fminsearch(f, [a, b)) %Find the minimum in the f-e (x) -franke (x (1),x (2)); [x,z? -fminsearch ( f, [a, b)) tFirst Max (make sure to x,z]fminsearch (f, [a, b]) Second Max tFranke's test function graph Make negative to identify the maxima change the sign of z) Replace (a, b) in the code at three places using suitable starting points for computing the min and two max. Use the contour map to identify good starting points, Submit: Printout of this cover page, with your name on top. Printout of the contour map, with paths and min/max/saddle identified. Printout of your code proj2.m. Printout of computer generated ouput, with min and max identified.Explanation / Answer
That i guess is because, you used the variables a,b without first defining them. You need to first initiate the variables before you directly use them in your code.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.