[Scilab-users] Frequency response

Claus Futtrup cfuttrup at gmail.com
Fri Sep 14 20:57:04 CEST 2018


Dear Scilabers

I have calculated an impulse response and wish to do an FFT to achieve 
the frequency response. I know what to expect. In the matlab forum 
someone asked the same question and was recommended to use freqz ... I 
wonder what would be the equivalent function in Scilab?

https://www.mathworks.com/matlabcentral/answers/350350-how-to-plot-loudspeaker-frequency-response-from-its-impulse-response 


For example, to replicate the code snippet (second answer in above 
link), how to do this in Scilab?

h = rand(1,64); // impulse response (Matlab source code)
fs = 1000;
Nfft = 128;
[H,F] = freqz(h,1,Nfft,fs);
semilogx(F,mag2db(abs(H))); grid on;
xlabel('Frequency (Hz)'); ylabel('Magnitude (dB)');

Best regards,

Claus



---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20180914/b67aa376/attachment.htm>


More information about the users mailing list