how to extract spikes from a figure

Hello, eveyone.
I am processing some borehole data, but I have a problem now. After I plot the data, the figure has many spikes. I want extract those spikes.
Each spike is different,i.e.,different width and length. I was thinking using a moving average filter, but it does not work well. Or maybe I could define a cutoff value,like three times of the std of the total data. However, those spikes or outliers affect statistics, so its not accurate.
I am wondering is there any way I could do it automatically instead of manually pick up the start and end point of each spike.
If anyone has any advice, please let me know. Many thanks.
The image is here: please click the link. http://imgur.com/Sj1ZT

 Accepted Answer

Walter Roberson
Walter Roberson on 29 Jun 2012

4 Comments

Hello, Walter. I dont just want the peak value of the spikes, but the entire part of each spikes. I also found another function called fpeak from mathworks. Anyway,they dont work for my case. Could you please take look at my uploaded image? Thanks.
The two routines I indicated above do not just find the peak value: they find the peak locations as well. I think the one in the FEX might be able to find the peak widths too. With the location and width you can extract individual portions of data.
your second link is very helpful.Thx
hello,walter. Yes,I wanna both location and widths. The one from file exchange may work out. I will try this one. Thx again.

Sign in to comment.

More Answers (1)

Image Analyst
Image Analyst on 29 Jun 2012
If the built in peak detector doesn't work, then you might look elsewhere, such as to this paper:
Comparison of public peak detection algorithms for MALDI mass spectrometry data analysis

1 Comment

hello,iamge analyst. Thx for ur help. This paper is really helpful to understand different criterias to detect and extract spikes.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!