フィルターのクリア

Smoothing only peaks in a Curve

6 ビュー (過去 30 日間)
Anirudh
Anirudh 2014 年 2 月 21 日
コメント済み: Anirudh 2014 年 3 月 31 日
Hello,
The curve I have is shown in the image. Is there a way I could smooth only the peak, which is around the X=800 mark, ideally keeping the rest of the data as the raw signals.
In case I decide to join a raw and a smoothed curve (using a filter), the problem then I face is the joining point of the raw curve and the smoothed curve, which shows a step (undesired).
I would like to ideally keep the raw data till X=720 (point where constant rise starts), then continue with the raw data through the constant slope, i.e from x=720 to the point where smoothing of the peak starts, perform a smoothing with a factor and rejoin back with the raw data once the smoothing is done (keeping that step in mind again).
I was talking to one of the correspondents and it was nice of him to help me out on this thread, http://www.mathworks.com/matlabcentral/answers/116391-smoothing-only-a-part-of-a-curve#answer_124995 but I'm kinda needing an urgent answer, and if possible today.
Could anyone out there help me out on this one?
Regards,
Anirudh

回答 (2 件)

Nitin
Nitin 2014 年 2 月 22 日
Did you check the smooth function?

Image Analyst
Image Analyst 2014 年 2 月 22 日
Just smooth the whole thing, say with conv() to do a sliding average or with sgolay to so a sliding polynomial Savitzky-Golay filter. Then replace the original pixels with the smoothed one in the range you want
smoothedSignal = conv(originalSignal, ones(1,9), 'same'); % or whatever
newSignal = originalSignal; % Initialize
% Replace region of interest with smoothed values.
newSignal(index1:index2) = smoothedSignal(index1:index2); % You determine the indexes in some way.
  4 件のコメント
Image Analyst
Image Analyst 2014 年 2 月 28 日
Anirudh, what's the status of this? Are we done? Do you need a more comprehensive demo? Did I answer your question?
Anirudh
Anirudh 2014 年 3 月 31 日
Image Analyst, Thanks for writing back :).
I used the conv() function, smoothed the curve and replaced only a certain smoothed part (say X=750 to X=820), in the raw signals. I then smoothed this entire curve once again to eliminate the steps at X=750 and X=820.
But this is not a very convincing method as I'm deviating from the original values by more, so I'm still on the lookout for a better solution to this.
Thanks, Anirudh

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSmoothing and Denoising についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by