Question: HW 2 - Q 5 ) MATLAB, PLEASE MAKE CODE COPYABLE 2 D optimization Consider the following two - dimensional function: c ( x ,

HW2-Q5) MATLAB, PLEASE MAKE CODE COPYABLE
2D optimization
Consider the following two-dimensional function:
c(x,y)=5cos(9y10)sin(19x10)(x2+yx)
a) Use an anonymous function for c(x,y) and MATLAB's mesh function. Create a 3D plot of
the function from -6x6, and -1y5.
b) Use an initial guess of [5-1], find the maximum using MATLAB's built-in function
fminsearch. Use the fprintf function to print the results with 6 digits to the right of
the decimal point (e.g. "The maximum value of c,x.xxxxxx, occurs at x
=x*xxxxxx and y=x*xxxxxx.
c) Using MATLAB's plot 3 and hold commands, plot a red asterisk at the maximum in the
plot from part a).
d) Repeat parts b and c with an initial guess of [53] and a black asterisk.
e) In text answer the question: "What changes between the two different initial guesses and
why?"
 HW2-Q5) MATLAB, PLEASE MAKE CODE COPYABLE 2D optimization Consider the following

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!