How can we minimise a three-inpu​t-argument​s-function in MATLAB? Given is the function and the lower and upper value limits of the three input variables.

I have a function f which depends on three variables namely x,y and z. I have the lower and upper limits of x,y and z respectively. So how do I minimise the function f and find the values of x , y and z when the function is minimum. As far as I understand, the function "fmincon" is used only for single input variable. So I kindly request to provide some clarity on the solution.

3 commentaires

fmincon deals with arbitrary dimensions.
Best wishes
Torsten.
Hello Torsten, Could you please comment about the solution !
fun=@(x)(x(1)^2+x(2)^2+x(3)^2);
lb=[1;1;21];
ub=[2;2;25];
x0=[1;1;22];
x = fmincon(fun,x0,[],[],[],[],lb,ub)
Best wishes
Torsten.

Réponses (0)

Cette question est clôturée.

Clôturé :

le 20 Août 2021

Community Treasure Hunt

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

Start Hunting!

Translated by