www.gusucode.com > mbctools 工具箱 matlab 源码程序 > mbctools/@sweepsetfilter/removeResampling.m

    function obj = removeResampling(obj, index)
%REMOVERESAMPLING Remove the resampling process associated with a variable
%
%  SSF = REMOVERESAMPLING(SSF, INDEX) removes resampling expressions. INDEX
%  is a vector of indices of expressions to remove from the resampling
%  expressions.
%
%  Examples
%    ssf = removeResampling(ssf, 1)
%    ssf = removeResampling(ssf, [1, 2])
%
%  See also SWEEPSETFILTER, SWEEPSETFILTER/ADDRESAMPLING,
%  SWEEPSETFILTER/MODIFYRESAMPLING. 

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


% Ensure the indes is a row
index = index(:)';

% Get the resampling structure from the object
resampling = obj.resampling;

% Remove the appropriate elements of the resampling
resampling.resampleExp(index) = [];
resampling.varNames(   index) = [];

% Return the resampling structure to the object
obj.resampling = resampling;

% Update the object with the new resampling
obj = updateResampling( obj, [] );