2 %> @brief NOTCHPEAKARGCHK Validates the inputs
for the IIRNOTCH and IIRPEAK
5 % Author(s): P. Pacheco
6 % Copyright 1999-2002 The MathWorks, Inc.
7 % $Revision: 1.2 $ $Date: 2001/07/06 17:42:26 $
9 % Define default values.
10 Ab = abs(10*log10(.5)); % 3-dB width
13 % Check Wo and BW
for notch/peak filters.
19 % Parse and validate optional input args.
28 % Check Wo and BW
for notch/peak filters.
31 % Validate frequency cutoff and bandwidth.
32 if (Wo <= 0) || (Wo >= 1)
33 msg =
'The frequency Wo must be within 0 and 1.';
37 if (BW <= 0) || (BW >= 1)
38 msg =
'The bandwidth BW must be within 0 and 1.';
45 % Parse the optional input arguments.
55 % Determine
if input argument is a scalar numeric value.
57 % Initialize output args.
60 if isnumeric(option) && all(size(option)==1) % Make sure it
's a scalar
61 Ab = abs(option); % Allow - or + values
63 msg = 'Level of decibels specified by Ab must be a numeric scalar.
';