how to eliminate unwanted spikes with peaks

2 ビュー (過去 30 日間)
asma khedri
asma khedri 2017 年 7 月 31 日
回答済み: Jacob Ward 2017 年 9 月 5 日
When I plot my signal I notice that some peaks aren't well shaped, as shown in this figure.
This causes problems in my results later.
Is there any function to eliminate these unwanted spikes within the peaks?
  7 件のコメント
asma khedri
asma khedri 2017 年 8 月 1 日
Yes, I think this can work, but how can I write it properly !
Image Analyst
Image Analyst 2017 年 8 月 1 日
編集済み: Image Analyst 2017 年 8 月 1 日
It would be easier to show you if you attached the data array. And it would be easier if you had the Image Processing Toolbox so that we can find the weighted centroid of each spike. Do you have that toolbox?

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

回答 (1 件)

Jacob Ward
Jacob Ward 2017 年 9 月 5 日
You could try interpolating the data to get a clearer peak. Here's an example:
This code generates a peak similar to the one you posted:
x = 10:40;
y = [zeros(1,14) 4.6 4.5 zeros(1,15)];
plot(x,y,'b-')
ylim([0 6])
By interpolating onto a finer x-grid, we get a rounded peak at approximately the right point. You can also try using the 'spline' or 'pchip' methods instead of 'v5cubic' to see if they give you more desirable results
xfine = 10:.2:40;
yfine = interp1(x,y,xfine,'v5cubic');
plot(xfine,yfine,'b-')
ylim([0 6])

カテゴリ

Help Center および File ExchangeDetection, Range and Doppler Estimation についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by