Filter out the white noise by Low pass FIR filter via window based method??
3 views (last 30 days)
Show older comments
I have generated Gaussian random number sequence which is basically a white noise through the input sigma (standard deviation) and I want to filter it by using low pass FIR filter via window based (Hamming) method and I want the Gaussian shape overlap hamming window function in such a way that their spectral width (sigma) should be same or approximately same. How can I do that or check?? Also, is there any way to generate window function via input spectral width (sigma) value?? Here is the code: load oct2_fast % that only include x as time axis of length 35041 sigma=0.0237; mu=0; n2 = normrnd(mu,sigma,[length(x) 1]); fs=length(n2); Ts=1/fs; t=(0:Ts:1-Ts)'; N=50; % order of the filter wvtool(hamming(N)) cuttoff=1/2*pi*sigma;% wikipedia gaussian filter figure plot(t,n2,'c') hold on b=fir1(N,cuttoff,'low',hamming(N+1,'symmetric')); a=1; y1=filter(b,a,n2); hold on plot(t,y1,'r') legend('gaussian','filtered') grid
0 Comments
Answers (0)
See Also
Categories
Find more on Hamming in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!