www.gusucode.com > mbcdesign 工具箱 matlab 源码程序 > mbcdesign/@conlinear/constraintDistance.m

    function g = constraintDistance(obj, X)
%CONSTRAINTDISTANCE  Return distance from constraints
%
%  G=CONSTRAINTDISTANCE(OBJ,X)  returns the distance from the
%  constrained region for each point in X.
%
%  See also CONLINEAR

%  Copyright 2000-2005 The MathWorks, Inc. and Ford Global Technologies, Inc.

X = pFilterFactors( obj, X );
g = (X*obj.A' - obj.b)./obj.ScaleFactor;