Home > mpt > @polytope > polytope.m

polytope

PURPOSE ^

POLYTOPE Default constructor for the POLYTOPE object

SYNOPSIS ^

function [P] = polytope(varargin)

DESCRIPTION ^

POLYTOPE Default constructor for the POLYTOPE object

 POLYTOPE  Defines a new POLYTOPE object

 ---------------------------------------------------------------------------
 DESCRIPTION
 ---------------------------------------------------------------------------

 NOTE: preferred call is P=polytope(H,K)

   P = POLYTOPE     Creates an empty polytope in R^1

   P = POLYTOPE(Q)  Creates polytope P={x | H x <= K} from a structure Q
                    Structure Q has following fields:
                    H       - nc x nx matrix, (Note: Required field)
                    K       - nc x 1  vector, (Note: Required field)
                    normal  - is polytope in a normalized representation,
                              {0=no, 1=yes}, default: 0,
                    minrep  - is polytope in a minimal representation,
                              {0=no, 1=yes}, default: 0,
                    xCheb   - Center of a Chebyshev ball (i.e., interior point),
                    RCheb   - Radius of a Chebyshev ball

                    Note: If Q is of POLYTOPE class then P=Q (simple copy).

   P = POLYTOPE(V)  Creates polytope by making a convex hull ov the given vertices V

 Following calls may be used as well
   P = POLYTOPE(H,K)
   P = POLYTOPE(H,K,normal)
   P = POLYTOPE(H,K,normal,minrep)
   P = POLYTOPE(H,K,normal,minrep,xCheb,RCheb)

 ---------------------------------------------------------------------------
 ACCESSING INTERNAL DATA OF THE POLYTOPE STRUCTURE
 ---------------------------------------------------------------------------

 Each polytope object is internally represented by a structure with the above
 mentioned fields. It is not possible, however, to access these fields directly
 from the Matlab environment using the dot (.) delimiter (e.g. P.H). To
 retrieve these internal data, one has to use one of the following functions:

 To access the H-representation (P.H*x <= K):
   [H,K] = double(P)

 To access center and radius of the Chebyshev's ball:
   [xCheb,RCheb] = chebyball(P)

 To get information if a polytope is in normalized representation
   status = isnormal(P)

 To get information if a polytope is in minimal representation
   status = isminrep(P)

 To get information if a polytope is fully dimensional
   status = isfulldim(P)

 To get information if a polytope is bounded
   status = isbounded(P)

 To retrieve extreme points of a polytope (i.e. the V-representation)
   V = extreme(P)

 
 Consult individual help files and/or the MPT manual for more details

 ---------------------------------------------------------------------------
 MERGING OF POLYTOPES INTO POLYARRAYS
 ---------------------------------------------------------------------------

 Polytopes can be concatenated into arrays of polytopes (polyarrays). Each
 polyarray is again a polytope object, which allows to use them in any
 overloaded function which accepts individual polytope objects (check the
 manual for exceptions).

 Polytopes are concatenated into arrays using the [,] operator as follows:

   Q = [P1, P2, P3]

 The above command creates a polyarray with 3 elements (P1, P2 and P3). Each of
 these elements can be a polyarray, e.g.

   R = [P4, Q, [P5, P6], P7]

 A polyarray can be indexed using the standard (i) operator, i.e.

   Q(2) will return the second element of polyarray Q
 
 Check help polytope/subsref and polytope/subsasgn for more details.

 ---------------------------------------------------------------------------
 INPUT
 ---------------------------------------------------------------------------
 Q           - can be either a structure (described uppon) or a matrix with vertices
 H,K         - H-representation of the polytope
 normal      - set to 1 if you know the pair (H,K) is already normalized, 0 otherwise
 minrep      - set to 1 if you knot the pair (H,K) is already reduced, 0 otherwise
 xCheb,RCheb - user provided Chebyshev's ball parameters

 ---------------------------------------------------------------------------
 OUTPUT                                                                                                    
 ---------------------------------------------------------------------------
 P   - polytope


 see also POLYTOPE/DOUBLE, CHEBYBALL, ISFULLDIM, ISMINREP, ISNORMAL, EXTREME

CROSS-REFERENCE INFORMATION ^

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