## PlotFilter / Filter Coefficient Files

Version 1.3.0.0 (352 KB) by
PlotFilter plots filter responses. Filter files include ITU-T filters & QMF filters.

Updated 19 Jun 2009

PlotFilter
This program plots filter responses. The program takes as input a filter specification in [b,a] (numerator, denominator polynomials) form. It offers a number of different types of frequency response plots.
• log: Log amplitude plot with a limited dynamic range.
• log-radian: Log plot as above, with frequency axis labeled with normalized radian frequency.
• linear: Linear amplitude response.
• linear-radian: Linear plot as above, with the frequency axis labeled with normalized radian frequency.
• real: Linear plot of the real part of the response. The frequency response is decomposed into the product of a phase factor (the phase can be non-linear) and a real factor. The real factor (can be both positive and negative) is plotted.
• real-radian: Linear plot of the real part, with the frequency axis labeled with normalized radian frequency.
• phase: Plot of the unwrapped phase factor. This is the phase factor that accompanies the real factor (see above).
• phase-radian: Plot of the phase factor, with the frequency axis labeled in normalized radian frequency.
• delay: Plot of the group delay (derivative of the phase response).
• delay-radian: Plot of the group delay, with the frequency axis labeled in normalized radian frequency.

Features
• The frequency response is first calculated on a dense frequency grid. The frequency evaluation points are readjusted to coincide more closely with the local extrema of the response. In this way, zeros and maxima of the response are better reproduced and the envelope of the frequency response is shown correctly.
• For log amplitude plots, the amplitude range is chosen so that upper limit of the range is a multiple of 10 or 20 dB. The dynamic range is limited to be no more than 100 dB. The actual range depends on the number of filter coefficients.
• The number of plot points is reduced by eliminating points in regions in which the plot is smooth. In this way, the dense frequency grid is usually reduced to a very much smaller number of points without affecting the appearance. The critical regions of the plot are reproduced without change.
• The axis ticks are chosen using a custom algorithm which ensures that the number of labeled ticks is reasonable. An additional overlay is created so that shorter length ticks are created between the labeled ticks. In this way, we create axes with labels which are not overly crowded.
• The plots with radian labels are created by turning off normal labels and generating custom labels which include the pi designations.
Example:
h = hamming(120);

Filter Coefficient Files:
The filter files included in this package have the coefficients in ASCII. A header indicates the type of file and documents the design parameters. The routine ReadFilter reads the coefficient files and returns the filter transfer function in a form usable by PlotFilter and other Matlab filtering routines.

ITU-T Software Tools Library:
The ITU-T document “Software Tool Library”  has C-language routines for filtering speech and audio files. In these routines, the filter coefficients are imbedded in the code. The filter files included in this package have the coefficients extracted from the C-code. The filter files taken from the Software Tools Library have the prefix STL.

TIA Speech Coder Filter Files:
This package also includes filters used by the TIA in their speech coding standards. These filters have the prefix TIA and the name of the standard in the coefficient file name.

The Johnston Quadrature Mirror Filters  are included in this package. The notation for the filter coefficient files follows that in the original paper, e.g. QMF_16B.cof is a 16 coefficient QMF filter with transition band of type B.

Example:
Fs = 16000;
PlotFilter (b, a, Fs);

References:
1. ITU-T, “Software Tool Library for Speech and Audio Coding Standardization”, Recommendation G.191, Sept. 2005 (on-line at http://www.itu.int/rec/T-REC-g)
2. J. D. Johnston, “A Filter Family Designed for Use in Quadrature Mirror Filter Banks”, Proc. IEEE Int. Conf. Acoustics, Speech, Signal Processing (Denver, CO), pp. 291–294, April 1980.

### Cite As

Peter Kabal (2023). PlotFilter / Filter Coefficient Files (https://www.mathworks.com/matlabcentral/fileexchange/24331-plotfilter-filter-coefficient-files), MATLAB Central File Exchange. Retrieved .

##### MATLAB Release Compatibility
Created with R2009a
Compatible with any release
##### Platform Compatibility
Windows macOS Linux
##### Categories
Find more on Filter Banks in Help Center and MATLAB Answers

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

#### Filter/test/

Version Published Release Notes
1.3.0.0

Filter coefficient files included

1.1.0.0

Update to BSD License. Missing filter files included.

1.0.0.0