Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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?"
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications Dexa 2022 Workshops 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 In Computer And Information Science 33

Authors: Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil ,Bernhard Moser ,Alfred Taudes ,Atif Mashkoor ,Johannes Sametinger ,Jorge Martinez-Gil ,Florian Sobieczky ,Lukas Fischer ,Rudolf Ramler ,Maqbool Khan ,Gerald Czech

1st Edition

3031143426, 978-3031143427

More Books

Students also viewed these Databases questions