Regarding how to remove oscillations

Hi,
I am writing a code to reconstruct Fenton Karma model via Fourier Series using lsqcurvefit command. On recosntruction ,I got some oscillations.How can I remove them. I have attached the code with the required figure.

回答 (1 件)

Image Analyst
Image Analyst 2020 年 9 月 20 日

1 投票

Use medfilt1() or sgolayfilt() to get rid of small local oscillations.

3 件のコメント

star star
star star 2022 年 2 月 17 日
Hi There,
I have some figures, and I need to compute and plot oscillations in a for loop. As there have been numerous discussions on mathwork about calculating with
[a, peaklocs] = findpeaks (y (:,4)); Period = mean(diff (tnew (peaklocs)));
I use this method and multiply one -peak oscillation by two to produce a completed oscillation. But my issue is with the minor oscillations, as shown in the figure below. That produces a high oscillation, according to diff(tnew(peaklocs)), which is not correct. I can't check each loop in a 100-loop programme. I simply want to avoid calculating errors and use a general rule. As a result, I use sgolayfilt(y(:,4),5,21), although slight oscillations persist. I'd appreciate it if you could make any suggestions about these tiny oscillations.
Image Analyst
Image Analyst 2022 年 2 月 17 日
@star mahdavi take a look at all the different input options for findpeaks() and find one that will get rid of small ones, like maybe MinPeakHeight or something.
star star
star star 2022 年 2 月 18 日
Thank you, I figure it out.

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

カテゴリ

ヘルプ センター および File ExchangeGet Started with Signal Processing Toolbox についてさらに検索

質問済み:

2020 年 9 月 20 日

コメント済み:

2022 年 2 月 18 日

Community Treasure Hunt

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

Start Hunting!

Translated by