fmincon: how should x0 be specified
Show older comments
I want to minimize a multivariable uncontstrained function with lower and upper bounds. I don't have any information or idea how to define x0 as initial values and cannot accept zero values.Here is the code
obj = @(x) (1-x(1))*(5*x(2)^3+x(2)^2) + x(1)*(0.2*x(2)^3+1.2*x(2)^2);
x0=ones(0,30);
[x,fval] = fmincon(obj,x0,[],[],[],[],[0;30],[1;50])
How should the x0 be specified regarding the bounds of the variables?
Accepted Answer
More Answers (0)
Categories
Find more on Surrogate Optimization 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!