Hann Window Smoothing Help
조회 수: 5 (최근 30일)
이전 댓글 표시
Hi,
I'm attempting to smooth a set of values in an attempt to remove problems visualising the data which is skewed toward single points with high values amongst regions of low values - such as the one highlighted below. The first column below is essentially the X-axis value and the second column are the Y-axis values i'm trying to smooth.
87 1
109 1
298 1
396 1
400 1
412 455
414 1
415 1
417 2
Within MatLab i've carried out smoothing by using a Hann window, creating it with:
hann15=hanning(15);
and smoothing the signal with:
smooth15=conv(signal,hann15,'same');
However i've noticed that if I manually alter the Y values to include an aberrantly strong peak of the kind we are trying to reduce the prevalence of - this smoothing method includes the new value and constructs a smoothed peak bias toward this one outlier, increasing the flanking values.
Is there a way to get around this? Perhaps I need a new smoothing window shape?
Thanks for any help! I should add that i've never used MATLAB before today so i'm a total novice.
- Kayleigh
댓글 수: 0
답변 (1개)
Wayne King
2013년 11월 20일
Hi Kayleigh, Welcome to MATLAB. If your signal truly consists of values like
1 2 1 455 1 2
Then I think there are better ways to handle this:
1.) You can simply identify those values in your waveform, remove them, and then interpolate the missing value with the surrounding signal values.
2.) If you have the Wavelet Toolbox, there is an easy way to do this with wavelets. You can take the wavelet transform of the signal, those large values will be localized to the fine-scale coefficients, so you can remove those and reconstruct your signal without the large values.
It would help if you could attach a representative data file and if you can say whether you have the Wavelet Toolbox installed.
>>ver
will list which toolboxes you have.
댓글 수: 2
Wayne King
2013년 11월 20일
Thank you for the data, you have a large number of these peaks in your data, so I don't think the interpolation method will work.
The question is what size peaks do you want to maintain. You have many large values but also "intermediate" values as well.
참고 항목
카테고리
Help Center 및 File Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!