Solve the 1D “black box” problem by Golden section search (at least 3 iterations);

engineering

Description

Solve the 1D “black box” problem by Golden section search (at least 3

iterations);

2. Plot the 1D and 2D “black box” functions;

3. Search the minimum of the 1D and 2D “black box” functions using

fmincon; try different starting points, and report your observation.

4. Search the minimum of the 1D and 2D functions using Generic

algorithm.

5. Compare the optimal solutions found by different methods.


here are the functions:

First:

function y = fun_1D(x)

% x: [0, 5]

y = (x-3).^2 - x.^3/100;


Second:

function y = Himmelblau_fun2d(x)

% x1, x2: [-5, 5]

% [x1,x2] = meshgrid(-5:0.1:5,-5:0.1:5);

x1 = x(1);

x2 = x(2);

y = ( x1.^2 + x2 - 11 ).^2  + ( x1 + x2.^2 - 7 ).^2;


Related Questions in engineering category


Disclaimer
The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.