optimization function in matlab
Show older comments
i would like to ask about the optimization in matlab function that works with multi variable input with each input has different boundaries the output is only one variables
Accepted Answer
More Answers (1)
Torsten
on 30 Nov 2015
fun = @(x)(x(1)-5)^2+(x(2)+6)^2+x(3);
x0 = [1 1 1];
Lb=[0 -1 2];
Ub=[1 2 3];
[x,fval,exitflag,output] = fmincon(fun,x0,[],[],[],[],Lb,Ub);
disp(fval)
Best wishes
Torsten.
1 Comment
mohammed hussein
on 30 Nov 2015
Categories
Find more on Linear Least Squares in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!