www.gusucode.com > mbcdesign 工具箱 matlab 源码程序 > mbcdesign/@conswitch/getAbsoluteTolerance.m
function tol = getAbsoluteTolerance(con) %GETABSOLUTETOLERANCE Return absolute matching tolerance of switch model % % TOL = GETTOLERANCE(M) returns a vector the same length as the number of % switching factors, containing the absolute matching tolerance for each % factor. The absolute tolerance is the relative tolerance multiplied by % the variable range. % Copyright 2007 The MathWorks, Inc. [N,ng] = size(con.OpPoints); range = getRange( getInputFactors(con) ); % tolerance for comparison tol = con.Tolerance.*diff(range(:,end-ng+1:end),1);