How to plot loudspeaker frequency response from its impulse response?
Show older comments
I have the impulse response of a loudspeaker - how do I convert this to a frequency response and plot it as a typical frequency response plot as shown in attached image.
Thanks
<<

>>
Answers (2)
Honglei Chen
on 26 Jul 2017
Frequency response is the Fourier transform of the impulse response so you should be able to use freqz to compute it if you are talking about in discrete domain. For plotting, you may want to use semilogx.
For example,
h = rand(1,64); % impulse response
fs = 1000;
Nfft = 128;
[H,F] = freqz(h,1,Nfft,fs);
semilogx(F,mag2db(abs(H))); grid on;
xlabel('Frequency (Hz)'); ylabel('Magnitude (dB)');
HTH
1 Comment
Sanya Tayal
on 29 May 2019
Hey, what does the '1' mean in freqz(h,1,Nfft,fs) ?
Star Strider
on 26 Jul 2017
0 votes
That should be the frequency response of the speaker.
Categories
Find more on Fourier Analysis and Filtering 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!