www.gusucode.com > mbcdesign 工具箱 matlab 源码程序 > mbcdesign/@conbase/constraintDistance.m
function d = constraintDistance(con, X) %CONSTRAINTDISTANCE Signed distance to constraint boundary for a list of points % % D = CONSTRAINTDISTANCE(CON, X) is the signed distance to the boundary of the % constraint CON for the list of points X. This method constitutes the core % definition of the constraint in terms of what is in and what is out. % % X should be an array with nFactors( CON ) columns. D will be a vector with % the same number of rows as X. % % All sub-clases must overload this method. % % See also CONBASE, CONBASE/ISINSIDE, CONBASE/BRINGINSIDE. % Copyright 2004-2005 The MathWorks, Inc. d = repmat( -1, size( X, 1 ), 1 ); if ~strcmpi( 'conbase', class( con ) ), warning(message('mbc:conbase:InvalidState', upper( mfilename ), class( con ))); end %------------------------------------------------------------------------------| % EOF %------------------------------------------------------------------------------|