normalize

Purpose

Normalizes polyhedron in H-representation.

Syntax

P.normalize
normalize(P)

Description

Normalize polyhedron by scaling each inequality ../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/normalize1.png and equality ../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/normalize2.png such that each row has unitary norm, i.e. ../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/normalize3.png and ../../../../../../fig/mpt/modules/geometry/sets/@Polyhedron/normalize4.png. The normalization routine is very useful to prevent from numerical problems involved in badly scaled polyhedra.

Input Arguments

P

Polyhedron object.

Class: Polyhedron

Example(s)

Example 1

Badly scaled polyhedron
 P = Polyhedron([1000, 0.4, -351; -0.1, -1e4, 89.1],[780; 0.067]); 
 The values are stored inside the polyhedron as they are provided. 
 P.H 
ans =

                      1000                       0.4                      -351                       780
                      -0.1                    -10000                      89.1                     0.067

Normalize the polyhedron.
 P.normalize 
Polyhedron in R^3 with representations:
    H-rep (redundant)   : Inequalities   2 | Equalities   0
    V-rep               : Unknown (call computeVRep() to compute)
Functions : none
The values of H-representation have changed:
 P.H 
ans =

         0.943563707881528      0.000377425483152611        -0.331190861466416         0.735979692147592
     -9.99960308263276e-06        -0.999960308263276       0.00890964634662579      6.69973406536395e-06

See Also

polyhedron


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