Matlab - Average White Noise PSD
3 次查看(过去 30 天)
显示 更早的评论
Hey, I am currenctly facing the following problem: I have an audiosignal-vector y with a length of about 1e6. I want to add white noise to this signal and display the noises psd, which should be as flat as possible. The way I tried it:
[y,fs]=audioread('test.wav');
snr=5;
r=awgn(y,snr,'measured')-y; % There are other ways to create wgn but this shouldnt be the problem
MATp = zeros(length(r),50);
for i = 1:50
e=awgn(y,snr,'measured')-y;
[q,w]=pwelch(e,[],[],length(e)*2-1,fs);
MATp(:,i)=q;
end
p=mean(MATp')';
plot(w,p);
This works okay, but the psd is still far from flat. With 10000 psds to average it should be fine but this is way uses way too much memory. I found some other solutions on the internet but they all just worked with very short vectors (<<1e6). Are there any solutions for my Problem?
Thanks! Klaus
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Parametric Spectral Estimation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!