mldivide

Purpose

Set difference between polyhedra

Syntax

R = P \ Q
R = mldivide(P,Q)

Description

Function computes the set difference between polyhedron ../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/mldivide1.png and ../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/mldivide2.png which can be both single polyhedra or arrays of polyhedra in the same dimension The set difference operation is defined as

../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/mldivide4.png

where the output ../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/mldivide3.png can comprise of multiple polyhedra.

Input Arguments

P

Polyhedron in any format

Class: Polyhedron

Q

Polyhedron in any format

Class: Polyhedron

Output Arguments

R

Polyhedron (or array) R = P\S .

Class: Polyhedron

Example(s)

Example 1

Set difference of two full-dimensional polyhedra.
 P = ExamplePoly.randHrep; 

 S = 0.2*P; 
 We can plot the polyhedra. 
 plot([P,S]); 

../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/mldivide_img_1.png

Compute the set difference.
 Q = P \ S 
Polyhedron in R^2 with representations:
    H-rep (irredundant) : Inequalities   5 | Equalities   0
    V-rep (irredundant) : Vertices   4 | Rays   2
Functions : none
Plot the polyhedra Q.
 plot(Q,'color','limegreen'); 

../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/mldivide_img_2.png

See Also

plus, minus


© 2003 Mato Baotic: ETH Zurich , baotic@control.ee.ethz.ch

© 2003-2013 Michal Kvasnica: STU Bratislava, michal.kvasnica@stuba.sk

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