After designing a high-order filter (order 40) in FDATOOL, and exporting it to the workspace as "second-order sections" [SOS, G], I transform it into Transfer Function form using SOS2TF, and the magnitude response obtained is very different from what I designed in FDATOOL. Following is the code used to transform the data and display the resulting Magnitude response:
Fs=22050; % sample rate
%[B,A] = SOS2TF(SOS,G); doesn't work, but not the problem
[B,A] = sos2tf(SOS);[H,W]=freqz(B,A,1000);figureplot(Fs*0.5*W/pi,10*log(abs(H)))grid on;
Best Answer