Home > mpt > extras > analysis > mpt_isPWAbigger.m

# mpt_isPWAbigger

## PURPOSE

MPT_ISPWABIGGER Test if one PWA function is bigger than a second PWA function

## SYNOPSIS

function [how,maxD,maxX,minD,minX] = mpt_isPWAbigger(J1,J2,Options);

## DESCRIPTION

```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)|```

## CROSS-REFERENCE INFORMATION

This function calls:
• length LENGTH Returns number of regions over which the explicit control law is defined
• dimension DIMENSION Returns dimension of the given polytope
• end END Returns the last element in a given polytope array
• extreme EXTREME Calculates extreme points of a given polytope
• isfulldim ISFULLDIM Checks if a polytope is full dimensional
• isinside ISINSIDE Checks if a given point lies in the interior of a given polytope
• length LENGTH Returns number of elements in a polytope array
• size SIZE Returns size of the given polytope object
• mpt_error MPT_ERROR Function called if MPT toolbox is not initialized
This function is called by:

Generated on Thu 30-Mar-2006 10:26:47 by m2html © 2003