How can I minimize a function under inequality condition?

1 view (last 30 days)
Hi everybody :)
The situation is the following:
  • theta=[a,b,c,d] is a 4-by-1 vector;
  • f=@(theta) "someFunctionOfTheta";
  • I want to estimate the minimum of f under the condition a<b<c<d.
Is it possible?
Thank you for the help :)
M

Accepted Answer

Matt J
Matt J on 3 Dec 2014
Edited: Matt J on 3 Dec 2014
If f() is twice continuously differentiable, it is possible with fmincon. Your constraints a<=b<=c<=d are just linear inequalities A*theta<=b with
A =
1 -1 0 0
0 1 -1 0
0 0 1 -1
b =
0
0
0

More Answers (1)

Matteo
Matteo on 3 Dec 2014
I choose the one suggested by MattJ.
Thank (both of) you so much for the quick and the satisfying answer!
I need this for my thesis, so I think both of you will be cited in the acknowledgements ;)
M

Community Treasure Hunt

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

Start Hunting!