implementation of mean shift filtering for 1 dimensional array

조회 수: 1 (최근 30일)
Shailendra
Shailendra 2014년 2월 28일
답변: Wayne King 2014년 2월 28일
i wanted to implement mean shift filter on a 1 dimensional array data (sampled noisy square output from DAQ).
Pls find the attached file 'testdata' which has the data required for filtering.
Can any one help me in this regard?

답변 (2개)

Wayne King
Wayne King 2014년 2월 28일
편집: Wayne King 2014년 2월 28일
You can just do
x = detrend(testdata,0);
Now compare:
subplot(211)
plot(testdata)
subplot(212)
plot(x)
  댓글 수: 1
Shailendra
Shailendra 2014년 2월 28일
Dear Mr. King,
Thanks for your early reply. i wanted to have mean shift filtering so that i get almost perfect square waves, and then i would apply min and max on that filtered data to get the peak to peak voltage. That was my intention. can you suggest something in this regard.

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


Wayne King
Wayne King 2014년 2월 28일
Shailendra, there is a function in the Signal Processing Toolbox peak2peak that will do that.
You do have some noise in your data so simply mean shifting the data will not get rid of that problem.
I recommend peak2peak() if you have access to it.
Otherwise, you're going to have do some lowpass filtering and then peak detection.

카테고리

Help CenterFile Exchange에서 Digital Filter Analysis에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by