


MPT_ISPWABIGGER Test if one PWA function is bigger than a second PWA function
[how,maxD,maxX,minD,minX] = fjc_isPWAbigger(J1,J2,Options);
---------------------------------------------------------------------------
DESCRIPTION
---------------------------------------------------------------------------
Test if one PWA function J1(x) is bigger than a second PWA function J2(x)
defined over the same compact set.
---------------------------------------------------------------------------
INPUT
---------------------------------------------------------------------------
J1, J2 - PWA functions described by Ji(x) = Ji.Bi{k} * x + Ji.Ci{k}
where x is in the polytopic region Ji.Pn(k)
Note: the total domains of both functions have to be
identical!!
Options
.Vdiff_tol - tolerance for which two vertices of the polyhedral partition
are considered equal (default: 1e-8)
.Jdiff_tol - tolerance for which two function values are considered equal
(default: 1e-6)
---------------------------------------------------------------------------
OUTPUT
---------------------------------------------------------------------------
how - =0, if J1(x)= J2(x) for all x in intersect(J1.Pn,J2.Pn)
=1, if J1(x)>= J2(x) for all x in intersect(J1.Pn,J2.Pn)
=2, if J1(x)<= J2(x) for all x in intersect(J1.Pn,J2.Pn)
=3, if J1(x)>= J2(x) for some x in intersect(J1.Pn,J2.Pn)
and J1(x)<= J2(x) for some x in intersect(J1.Pn,J2.Pn)
maxD - max_x |J1(x) - J2(x)|
maxX - argmax_x |J1(x) - J2(x)|
minD - min_x |J1(x) - J2(x)|
minX - argmin_x |J1(x) - J2(x)|