www.gusucode.com > mbcview 工具箱matlab源码程序 > mbcview/@cgtradeoffgui/@mmeditor/setTolerance.m

    function setTolerance(obj, tol)
%SETTOLERANCE Set the tolerance of inputs to the switch models
%
%  SETTOLERANCE(OBJ, TOL) sets the tolerance of inputs to the switch
%  models and then fires the AToleranceChanged event.  TOL is a vector
%  containing a relative tolerance setting for each switch factor.

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


obj.Tolerance = tol;

% Update sample models
obj.SampleTakenModel = setTolerance(obj.SampleTakenModel, tol);
obj.SampleRejectedModel = setTolerance(obj.SampleRejectedModel, tol);

% Update breakpoints if required
if obj.AutoBreakpoints
    obj.pAutoGenerateGrid;
    obj.send('BreakpointsChanged', handle.EventData(obj, 'BreakpointsChanged'));
end

% Send change event
obj.send('ToleranceChanged', handle.EventData(obj, 'ToleranceChanged'));