constrainys in fminsearch function

1 Ansicht (letzte 30 Tage)
lefteris
lefteris am 13 Dez. 2012
Hi,
I want to use fmincon (or another Matlab function) to minimize a function over the vector x=[a, b, c, d].
One of the constraints is b!=d (b not equal to d).
Is it possible to pass any constraint like this in fminsearch? If not, do you know another function or way to implement the estimation?
Thanks in advance!

Antworten (1)

Matt J
Matt J am 13 Dez. 2012
Bearbeitet: Matt J am 13 Dez. 2012
If the function you're minimizing is continuous, there is no point in imposing such a constraint. If the unconstrained minimum does not occur at b=d, then the constraint will get enforced automatically by solving the unconstrained problem.
If the unconstrained minimum does occur at b=d, then the constrained minimum is undefined. The function can always be made arbitrarily smaller by letting
b-d-->0
asymptotically. Any algorithm applied to such a problem would have to converge to the minimizing point satisfying b=d even if each iteration of the algorithm satisfied b~=d. it It would be like trying to minimize
f(x) = x^2 s.t. x>0

Kategorien

Mehr zu Nonlinear Optimization finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by