How to find optimiazed values of variables that will maximize the function

I have a function "F" with three points in xy-plane (6 variables) x1,y1, x2,y2, and x3,y3. I want to find to the values of these points whe the function will have maximum value over a range for example (-100,-100) to (100,100) in xy-plane. Please guide me how can I do it. Actually, my knowledge about optimization problems is almost zero. Thanks

3 Comments

It sounds to me as if you have a function of two variables that you want to maximize over a particular range and then evaluate st three particular points?
Or is this a curvefitting task, that you have a function in two, or three or four parameters and two variables, and you have the function value at three particular points and you want to use the given points to find all except one of the parameters and then you want to find the value of the remaining parameter that maximizes the function in the given region?
I can't get, either you want to use these three points to restore y=y(x) function, using interpolation, and then find its maximum, or you have a plane in 3D, restored by three points z=z(x,y), or you have a function F=F(x1,y1,x2,y2,x3,y3) of six variables and want to find its maximum.
Anyway, MATLAB algorithms (for example, 'fminsearch'), search for the minimum value of function without restrictions. You have to:
1. Invert your function like
f1 = L - f
where 'L' is a value, greater than your function maximum. So, you will search for a minimum of 'f1', that will be a maximum for 'f'.
2. Restrict your function, using penalty method, for example,
f1 = f1 + L * (-100 <= x && x <= 100)
fmincon() and most other minimizers permit supplying upper and lower bounds.

Sign in to comment.

Answers (0)

Categories

Find more on Robust Control Toolbox in Help Center and File Exchange

Asked:

on 22 Sep 2018

Commented:

on 22 Sep 2018

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!