Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are asked to do the following: Develop your own MATLAB m-file (script or functional) for the following 1-D optimization methods: Golden-section search method Parabolic

image text in transcribed
You are asked to do the following: Develop your own MATLAB m-file (script or functional) for the following 1-D optimization methods: Golden-section search method Parabolic interpolation (You can follow my codes given in In_class activity #4 and #4a) Use your two MATLAB m-files to find the minimum of the following function: y = 6cos x - 1.5sin x between x = 2 and x = 4. Make a plot of the function to show the minimum point. Find the minimum of the above function in (2) by using the MATLAB function 'fminbnd' with options. Generate the contour and mesh plots of the function: Visualizing a Two-Dimensional Function Problem Statement Use MATLAB's graphical capabilities to display the following function and visually estimate its minimum in the range -2 lessthanorequalto x_1 lessthanorequalto 0 and 0 lessthanorequalto x_2 lessthanorequalto 3: f(x_1, x_2) = 2 + x_1 - x_2 + 2x_1^2 + 2x_1 x_2 + x_2^2 Solution The following script generates contour and mesh plots of the function: x = linspace (-2, 0, 40): y = linspace (0, 3, 40) [X, Y] = meshgrid(x, y): Z=2+X-Y*2*X. ^2+2*X.*Y+Y.a^2: subplot(1, 2, 1): c =contour(X, Y, Z), -clabel(cs): xlabel ('x_1'), ;ylabel (x_2'): title ('(a) contour plot ');grid: subplot(1, 2, 2): cs=surface(X, Y, Z): zmin =floor (min(z)): z max = ceil (max(z)): xlabel ('x_1'): ylabel ('x_2'): zlabel ('f(x_1, x_2)'): title

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

The Structure Of The Relational Database Model

Authors: Jan Paredaens ,Paul De Bra ,Marc Gyssens ,Dirk Van Gucht

1st Edition

3642699588, 978-3642699580

More Books

Students also viewed these Databases questions

Question

7. How might you go about testing these assumptions?

Answered: 1 week ago