Problem plotting frequency response of a lowpass butterworth filter
1 view (last 30 days)
Show older comments
I had this working fine for a Bessel filter, but then I switched over to Butterworth and broke it. I think there's something I'm not understanding about the cuttoff frequency or the output of the freqs function and how it differs from Bessel. Here's a link to the file I imported.
%% load stuff
M = readtable('dB Technologies T4 PS1.xlsx','Sheet','TF'); % Import transfer function data with Frequency, Magnitude, Phase (deg), and Coherence
%% create filter
[b,a] = butter(2,100/(96000/2)); % Data in my file above originally sampled at 96kHz
%% convert to freq response
w = M.Frequency_Hz;
h = freqs(b,a,w);
magdB = mag2db(abs(h));
%% Plot
semilogx(w,magdB)
I'm expecting the output to look something like the Bessel filter did (in orange):
0 Comments
Answers (0)
See Also
Categories
Find more on Analog Filters in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!