outerApprox

Purpose

Computes outer bounding box of the convex set.

Syntax

B = outerApprox(S)
B = S.outerApprox

Description

Compute the smallest axis-aligned hypercube that contains this set. The lower and upper bounds of the hypercube are stored under Internal property, i.e. Internal.lb for lower bound and Internal.ub for upper bound.

Input Arguments

S

Any set derived from ConvexSet class, e.g. YSet or Polyhedron.

Class: ConvexSet

Output Arguments

B

Bounding box ../../../../../../fig/mpt/modules/geometry/sets/@ConvexSet/outerapprox1.png described as Polyhedron in H-representation.

Class: Polyhedron

Example(s)

Example 1

Describe circle in 2D using YALMIP
x = sdpvar(2,1);

F = [x'*x<=1];

S = YSet(x,F); 
 The bounding box for the circle is a cube with diameter 1. 
 B = S.outerApprox 
Polyhedron in R^2 with representations:
    H-rep (redundant)   : Inequalities   4 | Equalities   0
    V-rep               : Unknown (call computeVRep() to compute)
Functions : none
Plot the sets
 S.plot; hold on; B.plot 

../../../../../../fig/mpt/modules/geometry/sets/@ConvexSet/outerapprox_img_1.png

Example 2

We have a lower dimensional polyhedron in 3D.
 P = Polyhedron('A',randn(9,3),'b',ones(9,1),'Ae', randn(1,3),'be',0.5);
 Compute the bounding box
 B = P.outerApprox; 
 Plot the sets such that the outer approximation is wired. 
 P.plot; hold on; B.plot('wire',true,'LineWidth',3) 

../../../../../../fig/mpt/modules/geometry/sets/@ConvexSet/outerapprox_img_2.png

See Also

support, separate


© 2010-2013 Colin Neil Jones: EPF Lausanne, colin.jones@epfl.ch

© 2010-2013 Martin Herceg: ETH Zurich, herceg@control.ee.ethz.ch