Plotting Experimental vs Theoretical Filter in Matlab
3 views (last 30 days)
Show older comments
I have designed an IIR filter in matlab and then used those coefficients to do some audio filtering on some additional hardware. I then logged several frequencies using a function generator and an oscilloscope. Now I'd like to take the data I've collected and compare it to the original filter in matlab. Data pieces I have:
1. Original filter coefficients.
2. Input and output amplitudes of the experimental filter at a range of different frequencies.
If I plot the theoretical filter using code like this:
H = dsp.IIRFilter('Numerator',bcoefs,'Denominator',acoefs);
fvtool(H);
I get a nice curving theoretical graph.
However, my experimental data when I plot it like this:
plot(freqs,sfilter);
Where freqs is a vector of my frequencies and sfilter is a vector of the amplitudes I get a linear graph.
I need help figuring out how to compare my theoretical filter to my actual data. Any ideas here would be greatly appreciated.
Thanks in advance.
0 Comments
Answers (0)
See Also
Categories
Find more on Audio I/O and Waveform Generation 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!