www.gusucode.com > mbc 工具箱 matlab 源码程序 > mbc/@mbcmodel/@data/ModifyTestFilter.m
function D = ModifyTestFilter(D, index, expr) %MODIFYTESTFILTER Modify a user-defined test filter in a data set. % % D = MODIFYTESTFILTER(D, TEST_FILTER_INDEX, NEW_TEST_FILTER_EXPRESSION); % % See also mbcmodel.data.AddTestFilter, mbcmodel.data.RemoveTestFilter. % Copyright 2004-2007 The MathWorks, Inc. error(mbcnargchk(3, 3, nargin, 'mbc:mbcmodel:data')); try % Make sure the index is correct if index < 1 error(message('mbc:mbcmodel:data:InvalidIndex3')); end if index > numSweepFilters(D.Object) error(message('mbc:mbcmodel:data:InvalidIndex4')); end % Call the underlying method D.Object = modifySweepFilter(D.Object, index, expr); catch E [mnemonic, component] = mbcGetLastError(E); switch [component ':' mnemonic] case 'data:InvalidIndex' error('mbc:mbcmodel:data:InvalidIndex5', E.message); otherwise error(message('mbc:mbcmodel:data:UnknownError10')); end end