Discrete function estimation from Parametric Audio Equalizer
Afficher commentaires plus anciens
Hello,
I am making a audio equalizer on a FPGA. The filtering is going fine but it would be nice to see the frequency response of the filter. I have checked the Parametric Audio Equalizer example and the Discrete function estimation is exactly what i need. But it is not working in my own matlab test. I checked the Discrete Transfer Function Estimator block from simulink but the methode described is not working. Can somone help me with this?
The code: (y is the output and xa the input)
N=1024; % 1024 test samples
window = hamming(N)';
ywin = window .* y';
xawin = window .* xa;
Y = fft(ywin);
X = fft(xawin);
YPSD=zeros(N,1)';
XPSD=zeros(N,1)';
YPSD=YPSD+abs(Y).^2;
XPSD=XPSD+abs(X).^2;
PYX = XPSD .* conj(YPSD);
f=[0:(N)-1]*Fs/(N);
figure; plot(f,10*log10(PYX)); title('welch');
xlabel('Frequency (Hz)')
ylabel('Magnitude (dB)')
Réponses (0)
Catégories
En savoir plus sur Signal Operations dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!