This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Get quality factor


Q = getQualityFactor(npFilter)



Q = getQualityFactor(npFilter) returns the quality factor (Q factor) of the notch peak filter. The Q factor is defined as the center frequency divided by the bandwidth.


collapse all

Create a dsp.NotchPeakFilter object in the default configuration, where the Specification property is set to 'Bandwidth and center frequency'.

np = dsp.NotchPeakFilter
np = 
  dsp.NotchPeakFilter with properties:

      Specification: 'Bandwidth and center frequency'
          Bandwidth: 2205
    CenterFrequency: 11025
         SampleRate: 44100

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.

ans = 5

Visualize the filter response using fvtool.


Input Arguments

collapse all

Notch peak filter whose quality factor is computed, specified as a dsp.NotchPeakFilter object.

Output Arguments

collapse all

Quality factor of the filter, returned as a scalar. The Q factor is defined as the center frequency divided by the bandwidth.

Data Types: double

Introduced in R2014a