function varargout = fircband(varargin)
%FIRCBAND Constrained-band equiripple FIR filter design.
%   FIRCBAND designs equiripple FIR filters while constraining one or more
%   bands of the filter to have a maximum ripple value.

%   Copyright 1999-2013 The MathWorks, Inc.

% Suppress the Deprecated Feature warning.
ignoreID = 'dsp:firgr:DeprecatedFeature';
w = warning('off', ignoreID);

[wstr, wid] = lastwarn('');

try
    
    % Call FIRGR
    [varargout{1:nargout}] = firgr(varargin{:});
catch ME 
    % If FIRGR errors we need to reset the warning states so it looks like
    % it is coming from FIRCBAND.
    [~, lid] = lastwarn;
    if strcmpi(lid, ignoreID)
        lastwarn(wstr, wid);
    end
    warning(w);
    throw(ME);
end

% If the last warning was the suppressed warning remove it from LASTWARN.
[~, lid] = lastwarn;
if strcmpi(lid, ignoreID)
    lastwarn(wstr, wid);
end

warning(w);

% [EOF]
