How make this curve bit smooth or how to reduce some spikes?

조회 수: 12 (최근 30일)
Nisar Ahmed
Nisar Ahmed 2021년 9월 4일
댓글: LALIT PANKAJ GROVER 2021년 9월 4일
Hi,
I want to make this curve bit smoth by minimizing some spikes or I want remove some high frequency content from the curve.
How I can do it? I to do it by applying some moving average filter or band pass filter, etc.?

채택된 답변

Star Strider
Star Strider 2021년 9월 4일
I to do it by applying some moving average filter or band pass filter, etc.?
That depends entirely on the nature of the noise. None of those will work with broadband noise because they are all essentially frequency-selective filters. For broadband noise, use the Savitzky-Golay filter (Signal Processing Toolbox sgolayfilt function), or the 'sgfilt' option in the smoothdata function. Wavelet denoising is also an option.
The best way to determine if the noise is band-limited is to first takt the fft of it. That plot will tell you.
.
  댓글 수: 4
Nisar Ahmed
Nisar Ahmed 2021년 9월 4일
@Star Strider Thank you, these are good options
Star Strider
Star Strider 2021년 9월 4일
As always, my pleasure!
.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Chunru
Chunru 2021년 9월 4일
Try the median filter, where X is your data, N could be around 10 (try it out).
Y = medfilt1(X,N)
  댓글 수: 2
Nisar Ahmed
Nisar Ahmed 2021년 9월 4일
Thanks @Chunru it works, but how can I apply moving average here, it may help to reduce some data points and spikes will minimize automatically...
LALIT PANKAJ GROVER
LALIT PANKAJ GROVER 2021년 9월 4일
You can use:
a = movmean(A,K)
A is vector or matrix on which you want apply mean average.
K is a silding window along which you receive your mean.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Smoothing and Denoising에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by