Create a graphicEQ and then call coeffs to get its coefficients. The coefficients are returned as second-order sections. The dimensions of B are 3-by-(M * EQOrder / 2), where M is the number of bandpass equalizers. The dimensions of A are 2-by-(M * EQOrder / 2). The leading unity coefficient is not returned.

Compare the output of the filter function using coefficients B and A with the output of graphicEQ. For simplicity, compare output from channel five only.

channelToCompare = 5;
y = x;
for section = 1:equalizer.EQOrder/2
for i = 1:numel(equalizer.Gains)
y = filter(B(:,i*section),[1;A(:,i*section)],y);
endend
audioOut_filter = y;
audioOut = equalizer(x);
subplot(2,1,1)
plot(abs(fft(audioOut)))
title('graphicEQ')
ylabel('Magnitude Response')
subplot(2,1,2)
plot(abs(fft(audioOut_filter)))
title('Filter function')
xlabel('Bin')
ylabel('Magnitude Response')

Create the default gammatoneFilterBank, and then call coeffs to get its coefficients. Each gammatone filter is an eighth-order IIR filter composed of a cascade of four second-order sections. The size of B is 4-by-3-by-NumFilters. The size of A is 4-by-2-by-NumFilters.

Compare the output of the filter function using coefficients B and A with the output of gammaFiltBank. For simplicity, compare output from channel eight only.

Create the default octaveFilterBank, and then call coeffs to get its coefficients. The coefficients are returned as second-order sections. The dimensions of B and A are T-by-3-by-M, where T is the number of sections and M is the number of filters.

Compare the output of the filter function using coefficients B and A with the output of octaveFilterBank. For simplicity, compare output from channel five only.

The coeffs function of octaveFilterBank
now returns the filter in second-order sections (SOS) instead of fourth-order sections
(FOS). This new format reflects an updated internal representation, which has been enhanced
to remain stable at very low frequencies.

You can also select a web site from the following list:

How to Get Best Site Performance

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.