4.16667

4.2 | 6 ratings Rate this file 45 Downloads (last 30 days) File Size: 6.96 KB File ID: #15361

Despiking

by Nobuhito Mori

 

20 Jun 2007 (Updated 01 Jul 2009)

This function remove spike noise from data.

| Watch this File

File Information
Description

This function remove spike noise from data. This function originally wrote for removing spike noise in time-series water velocity data but can be used for general purpose. The basic idea comes from Goring and Nikora (2002) which considers first and second derivatives of time series signal. See detail in the reference.

Referece
- Mori, N., T. Suzuki and S. Kakuno (2007) Noise of acoustic Doppler velocimeter data in bubbly flow, Journal of Engineering Mechanics, American Society of Civil Engineers, Volume 133, Issue 1, pp.122-125.

MATLAB release MATLAB 7.2 (R2006a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (10)
03 Jul 2007 D. Januar

Works realy fine with 3D face data, but some interpolation algorithm for filling the holes would be fine!

08 Aug 2007 landulfo Silveira

The algorithm leaves NAN symbols in the place of removed spikes. I coudn't use it.

03 Sep 2007 Evaggelos Karvounis

Dear Mr. Nobuhito,

Could you please send me the paper again. There were errors when i was
trying to open the pdf gile.

Send it as a pdf and in a zip file if its possible.

Thanks in advance...

Evaggelos Karvounis, PhD

09 Dec 2009 Jac Billington

Is there anyway I can get round the use of nanmean for this? I don't have the statistical toolbox in order to use this.

It would be great if you could offer some advice, still pretty new to Matlab.

thanks in advance. Jaclyn.

23 Dec 2009 Georg Stillfried

Jac Billington

write your own nanmean function, e.g.:

function m = nanmean (x)
x = x(~isnan(x))
m = mean(x)

23 Dec 2009 Georg Stillfried

P.S. I just noticed that this works only if x is a vector. If x is an array, the "official" nanmean will calculate the mean columnwise or along a specified dimension. What they do there is to set the NaNs to zero, sum up the columns and divide by the number of no-NaNs:

function m = nanmean (x,dim)
if nargin<2, dim=1; end
nans = isnan(x);
x(nans) = 0;
sumx = sum(x,dim);
m = sumx./sum(~nans);

Save the file as nanmin.m in a directory on the Matlab path.

hope this helps,
GS

05 Oct 2010 Shan

So far it works fairly well for my seismic data, even though it might take some of the valid signals as spikes as well. Still, I am amazed by the quite accurate targeting this this function. Excellent work!

16 Nov 2010 santa teo

doesnt work

20 May 2011 Christian Stranne

Great for despiking ADCP data!

22 Dec 2011 Frank

Using this function set for a custom MatLab based ADV signal processing toolset I made. Exactly what I needed. So glad I didn't have to write this myself. Works great!
Thx!

Please login to add a comment or rating.
Updates
01 Jul 2009

BSD license has been applied. Readme.txt is included.

Tag Activity for this File
Tag Applied By Date/Time
filter design Nobuhito Mori 22 Oct 2008 09:16:30
filter analysis Nobuhito Mori 22 Oct 2008 09:16:30
spike noise despiking data Nobuhito Mori 22 Oct 2008 09:16:30
spike noise despiking data Kenneth 01 Apr 2011 06:35:57
filter analysis Emilio 22 Nov 2011 10:03:03

Contact us at files@mathworks.com