simple fmincon problem, optimization toolbox
1 次查看(过去 30 天)
显示 更早的评论
I have an optimization problem in that Matlab solves depending on the initial value given. First, I give X0 = [10 10 10] as the initial value, and ok. But then I give X0 = [0 0 0] as the initial value, which is not a minimum, Matlab gives it as the minimum. Why?
FUN = @(x)-prod(x);
X0 = [10 10 10];
A = [-1 -2 -3;
1 2 3];
B = [0 ; 72];
options = optimset('Display','iter');
X = fmincon(FUN, X0, A, B, [], [], [], [], [], options)
FUN = @(x)-prod(x);
X0 = [0 0 0];
A = [-1 -2 -3;
1 2 3];
B = [0 ; 72];
options = optimset('Display','iter');
X = fmincon(FUN, X0, A, B, [], [], [], [], [], options)
0 个评论
回答(1 个)
Matt J
2021-9-10
编辑:Matt J
2021-9-10
The point X=[0,0,0] is a first order local minimum. It is a point of zero-gradient, and it satisfies the constraints. You made an unlucky initial guess.
Incidentally, if you are looking for solutions with positive x(i) it would probably be better, numerically, to use the equivalent objective function
FUN=@(x)-sum(log(x))
as well as to impose lower bounds lb=[0;0;0]
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Get Started with Optimization Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!