isEmptySet

Purpose

Test if a convex set is empty.

Syntax

ts = S.isEmptySet
ts = isEmptySet(S)

Description

Return true if the convex set ../../../../../../fig/mpt/modules/geometry/sets/@ConvexSet/isemptyset1.png is empty and false otherwise.

Input Arguments

S

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

Class: ConvexSet

Output Arguments

ts

True if the convex set ../../../../../../fig/mpt/modules/geometry/sets/@ConvexSet/isemptyset2.png is empty and false otherwise.

Class: logical

Allowed values:

  • true
  • false

Example(s)

Example 1

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

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

S = YSet(x,F); 
 Check if the set is not empty 
 S.isEmptySet 
ans =

     0

Example 2

We have non-consistent constraints in 2D.
x = sdpvar(2,1);

F = [2*x(1)-3*x(2) <= 2; 2*x(1)-3*x(2) >= 3];

S = YSet(x,F); 
 The set must be empty 
 S.isEmptySet 
ans =

     1

See Also

isbounded


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

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