Question: HW 2 - Q 5 ) MATLAB, PLEASE MAKE CODE COPYABLE 2 D optimization Consider the following two - dimensional function: c ( x ,
HWQ MATLAB, PLEASE MAKE CODE COPYABLE
D optimization
Consider the following twodimensional function:
a Use an anonymous function for and MATLAB's mesh function. Create a D plot of
the function from and
b Use an initial guess of find the maximum using MATLAB's builtin function
fminsearch. Use the fprintf function to print the results with digits to the right of
the decimal point eg "The maximum value of occurs at
and
c Using MATLAB's plot and hold commands, plot a red asterisk at the maximum in the
plot from part a
d Repeat parts and with an initial guess of and a black asterisk.
e In text answer the question: "What changes between the two different initial guesses and
why?"
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
