Home > mpt > extras > auxiliary > unitbox.m

unitbox

PURPOSE ^

UNITBOX Creates a unit box centered at origin

SYNOPSIS ^

function P=unitbox(dimension, boxsize)

DESCRIPTION ^

UNITBOX Creates a unit box centered at origin

 P=unitbox(dimension, boxsize)

 ---------------------------------------------------------------------------
 DESCRIPTION
 ---------------------------------------------------------------------------
 Creates a unit box (hypercube) of dimension 'dimension' centered at origin
   with size 'boxsize'

 i.e. returns a polytope
   P=polytope([eye(dimension); -eye(dimension)], boxsize*ones(2*dimension,1))

 ---------------------------------------------------------------------------
 INPUT
 ---------------------------------------------------------------------------
 dimension  - dimension of hypercube
 boxsize    - size of the box (Optional, if not given, we assume 1)

 ---------------------------------------------------------------------------
 OUTPUT                                                                                                    
 ---------------------------------------------------------------------------
 P     - hypercube in H-representation

 see also POLYTOPE

CROSS-REFERENCE INFORMATION ^

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