Compute the support of the set in the specified direction.
s = support(S,x)
s = S.support(x)
S |
Any set derived from ConvexSet class, e.g. YSet or Polyhedron. Class: ConvexSet |
x |
The point given as real vector in the same dimension as the ConvexSet. Class: double |
s |
The support is returned as the optimal value of the cost function.
Class: double |
x = sdpvar(2,1);
F = set(0.3*x'*x -0.7*x(1)<=1) + set(-x(1)+2.3*x(2)<=0.5);
S = YSet(x,F);Compute the support in the direction of the point v=[1,1]
v = [1;1];
s = S.support(v)
s = 4.22461388383033Check if the support was computed properly by computing the point
r = S.extreme(v)
r = exitflag: 1 how: 'Successfully solved (SeDuMi-1.3)' x: [2x1 double] supp: 4.22461388383033Check the objective value
r.x'*v
ans = 4.22461388383033Plot the set with the points x, y
S.plot; hold on; text(v(1),v(2),'\bf x'); text(r.x(1),r.x(2),'\bf y');
Plotting... 26 of 40
◀ | removeallfunctions | getfunction | ▶ |
© 2010-2013 Colin Neil Jones: EPF Lausanne, colin.jones@epfl.ch
© 2010-2013 Martin Herceg: ETH Zurich, herceg@control.ee.ethz.ch