www.gusucode.com > mbcdesign 工具箱 matlab 源码程序 > mbcdesign/@contable2/isInside.m
function in = isInside(c, X, in) %ISINSIDE Check which points from a list are inside a constraint. % % ISINSIDE(CON, X, IN) is a logical vector indicating which points in X % (N-by-nfactors) are within the constrained region. IN is a logical % vector indicating which points to constrain and which to ignore, i.e., % which points are currently considered to be "in" the constrained region. % % See also CONTABLE2, CONBASE/ISINSIDE, CONTABLE2/CONSTRAINTDISTANCE. % Copyright 2000-2005 The MathWorks, Inc. and Ford Global Technologies, Inc. factors = getActiveIndices( c ); if any( in(:) ) sz = size( in ); BOOL_MODE = 1; in = xreginterp2d( c.breakrows, c.breakcols, c.table, ... factors([2, 1, 3]), c.le, X, BOOL_MODE, in ); in = reshape( in, sz ); end %------------------------------------------------------------------------------| % EOF %------------------------------------------------------------------------------|