Discrete function estimation from Parametric Audio Equalizer
显示 更早的评论
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)')
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Signal Operations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!