Prev: Rewriting equality or inequality constrains for fmincon or quadprog
Next: Counting crossings of a threshold
From: Matt J on 20 May 2010 16:01 "Jason" <jf203(a)ic.ac.uk> wrote in message <ht430v$ngj$1(a)fred.mathworks.com>... > Dear All, > > I wanted to ask the following question. > > If I have a quadratic optimization problem of the type > > min(x) x' Q x > > Where Q is symmetric but indefinite (3x3) matrix, and x is column vector of length 3. > > Fmincon and quadprog could solve this. However if I wanted to constrain that the first to elements of x, i.e. x1 and x2 lie on a unit circle, in other words: > > x1^2+x2^2 = 1 > > Then how could I rewrite that constrain as either an equality constrain of the type Ax = b or an inequality constrain of the type Ax <= b. Is that even possible? ================ No, theconstraint you've given is nonlinear, so you would have to use fmincon's nonlcon input parameter. Also, you should recognize that this problem may have no solution. For example, if Q=diag([1, 1, -1]) then your problem reduces to min(x3) 1-x3^2 which has no minimum. |