www.gusucode.com > mbcdesign 工具箱 matlab 源码程序 > mbcdesign/@contable1/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 CONTABLE1, CONBASE/ISINSIDE, CONTABLE1/CONSTRAINTDISTANCE.

%  Copyright 2000-2005 The MathWorks, Inc.


if any( in(:) )
    sz = size( in );
    BOOL_MODE = 1;
    in = xreginterp1d( c.breakcols, c.table, getActiveIndices( c ), c.le, X, BOOL_MODE, in );
    in = reshape( in, sz );
end

%------------------------------------------------------------------------------|
% EOF
%------------------------------------------------------------------------------|