%% Compute Quality Factor of Notch Peak Filter
% Create a dsp.NotchPeakFilter object in the default configuration, where the Specification property is set to 'Bandwidth and center frequency'.

np = dsp.NotchPeakFilter

% Determine the quality factor of the filter using the getQualityFactor function. The quality factor is given by the ratio of the center frequency to the bandwidth.

getQualityFactor(np)

% Visualize the filter response using fvtool.

fvtool(np)

%
% Copyright 2018 The MathWorks, Inc.