Home > mpt > @polytope > dointersect.m

# dointersect

## PURPOSE

DOINTERSECT Checks if two polytopes / polyarrays intersect

## SYNOPSIS

function [answer, IA, IB, IAB] = dointersect(P1,P2)

## DESCRIPTION

```DOINTERSECT Checks if two polytopes / polyarrays intersect

[answer, IA, IB, IAB] = dointersect(P1,P2)

---------------------------------------------------------------------------
DESCRIPTION
---------------------------------------------------------------------------
Returns true (1) if input polytopes / polyarrays intersect.

This function does not return the intersection!

---------------------------------------------------------------------------
INPUT
---------------------------------------------------------------------------
P1,P2   - Polytopes or polyarrays

---------------------------------------------------------------------------
OUTPUT
---------------------------------------------------------------------------
answer  - 1 if polytopes / polyarrays intersect, 0 otherwise
IA, IB  - index vectors such that P1(IA) & P2(IB) = intersect(P1, P2)
IAB     - indeces of intersecting polytopes stored as a n x 2 matrix, where
every row gives indeces of intersecting polytopes. returned as an
empty matrix if no intersections exist. Example:
IAB = [1 1; 2 1; 3 1] means that there exists a full-dimensional
intersection of (P1(1) and P2(1)), (P1(2) and (P2(1)) and (P1(3)
and (P2(1)).

## CROSS-REFERENCE INFORMATION

This function calls:
• length LENGTH Returns number of regions over which the explicit control law is defined
• bounding_box BOUNDING_BOX Compute a bounding box for a given polytope
• dimension DIMENSION Returns dimension of the given polytope
• double DOUBLE Function used to access internal properties of the given polytope
• end END Returns the last element in a given polytope array
• length LENGTH Returns number of elements in a polytope array
• chebyball_f CHEBYBALL_F Computes center and radius of the largest ball inscribed in a polytope
• unique UNIQUE Removes redundant entries from a polytope array
This function is called by:
• mpt_reachSets MPT_REACHSETS Computes sets of reachable states for a given system / controller
• mpt_sysStructInfo MPT_SYSSTRUCTINFO Returns information about system structure

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