Home > mpt > @polytope > union.m

union

PURPOSE ^

UNION convex union computation

SYNOPSIS ^

function [Pu,how] = union(Pn, Options)

DESCRIPTION ^

UNION convex union computation

 [Pu,how]=union(Pn,Options)

 ---------------------------------------------------------------------------
 DESCRIPTION
 ---------------------------------------------------------------------------
 This function tries to compute convex union of polytopes in the given polytope
 array Pn 

 USAGE:
   U = union([P1 P2 P3 ...])
   U = union([P1 P2 P3 ...], Options)
   [U,how] = union([P1 P2 P3 ...], Options)

 NOTE! if Pn has more than 2 elements, the "convex union" problem is in fact
 solved with polytope/isconvex.m, unless Options.useisconvex=0 is specified.

 ---------------------------------------------------------------------------
 INPUT
 ---------------------------------------------------------------------------
 Pn                  - Polytope array
 Options.useisconvex - if enabled, uses isconvex() to compute convex union.
                     if number of regions is smaller than 3 and this flag is
                     not defined, the default value will be 0. otherwise, it
                     will be set to 1.
                     
 Options.lpsolver  - solver used for LP problems
 Options.verbose   - level of verbosity
 Options.abs_tol   - absolute tolerance

 Note: If Options is missing or some of the fields are not defined, the default
       values from mptOptions will be used

 ---------------------------------------------------------------------------
 OUTPUT
 ---------------------------------------------------------------------------
 Pu       - polytope describing convex union in case such one exists, return
            array of input arguments otherwise
 how = 1    if union is convex
     = 0    union is not convex (in this case Pu=Pn)

 see also ENVELOPE, HULL, ISCONVEX

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Thu 30-Mar-2006 10:26:47 by m2html © 2003