How to plot MSE for error signal and fft for my code?
Afficher commentaires plus anciens
[s, f_s] = audioread('handel.wav');
noise= 0.2*cos(2*pi*(50/f_s)*(1:N));
d = s + noise;
figure(2);
plot(d);
L=20;
alpha=0.01;
delta=100;
[e,y,ff] = lms1_d(d,L,alpha,delta);
figure(3);
plot(e);
[c1x, c1y] = size(s);
[c2x, c2y] = size(d);
if c1x ~= c2x
disp('dimension do not agree');
else
R = c1x;
C = c1y;
err = sum((s - e).^2)/(R*C);
MSE = sqrt(err);
MAXVAL = 65535;
PSNR = 20*log10(MAXVAL/MSE);
disp(['mse=' num2str(MSE) ' PSNR=' num2str(PSNR)]);
end
2 commentaires
Geoff Hayes
le 17 Jan 2019
Priyanka - please explain/comment on what you are doing in the above code. Where is the FFT? What is the lms1_d?
Priyanka Shanmuga Raja
le 17 Jan 2019
Modifié(e) : Priyanka Shanmuga Raja
le 17 Jan 2019
Réponses (0)
Catégories
En savoir plus sur Fourier Analysis and Filtering 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!