How can we minimise a three-input-arguments-function in MATLAB? Given is the function and the lower and upper value limits of the three input variables.
Info
This question is closed. Reopen it to edit or answer.
Show older comments
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 Comments
Torsten
on 23 Mar 2015
fmincon deals with arbitrary dimensions.
Best wishes
Torsten.
quicklearner
on 23 Mar 2015
Torsten
on 23 Mar 2015
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.
Answers (0)
This question is closed.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!