Home > mpt > @polytope > isinside.m

isinside

PURPOSE ^

ISINSIDE Checks if a given point lies in the interior of a given polytope

SYNOPSIS ^

function [isin, inwhich, closest] = isinside(P,x0,Options)

DESCRIPTION ^

ISINSIDE Checks if a given point lies in the interior of a given polytope

 [isin, inwhich, closest] = isinside(P,x0,Options)

 ---------------------------------------------------------------------------
 DESCRIPTION
 ---------------------------------------------------------------------------
 Checks if the given point x0 lies in the interior of the polytope P

 ---------------------------------------------------------------------------
 INPUT
 ---------------------------------------------------------------------------
 P                 - Polytopes
 x0                - given point, if not specified: Options.clickx0=1
 Options.abs_tol   - absolute tolerance
 Options.fastbreak - if set to 1 and P is a polyarray, returns only the first
                     element of P in which x0 lies in
 Options.clickx0   - find the region by clicking in the plot
 Options.newfigure - if a new figure for clicking is desired (default = 1)

 Note: If Options is missing or some of the fields are not defined, the default
       values from mptOptions will be used

 ---------------------------------------------------------------------------
 OUTPUT                                                                                                    
 ---------------------------------------------------------------------------
 isin      - logical statement indicating if P.H*x0<=P.K was satisfied
 inwhich   - indices of polytopes in P (if P is an array of polytopes) in which
             the points lies [i.e. P(inwhich) will return all elements of P which
             contain the given point x0]
 closest   - if the point does not belong to P, index of the polytope which is
             closest to the point x is returned

 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