spikeRemoval

버전 2.1.0 (7.03 KB) 작성자: Dr. Erol Kalkan, P.E.
This function replace or delete unwanted spikes (outliers) exceeding the threshold value using histogram method.
다운로드 수: 674
업데이트 날짜: 2019/3/20

라이선스 보기

DESPIKING DISCRETE-TIME SIGNAL USING HISTOGRAM METHOD

Time series may contain undesired transients and spikes. This function replace spikes (outliers) exceeding the threshold value by interpolating among previous and subsequent data points or replacement them with NaN per user choice. The threshold is defined as mean +/- a number of standard deviations of windowed data centered at spike locations. This code uses the histogram method of Solomon et al. (2001) to detect spikes.

Examples are given in the comment section. The debug option when it is "True" compares results of this function with MatLAB's 1-D median filtering (medianfilt1) function.

For questions, comments and suggestions: kalkan76@gmail.com

Reference:

Solomon, O. M., D. R. Larson, and N. G. Paulter (2001). Comparison of some algorithms to estimate the low and high state level of pulses, IEEE Instrumentation and Measurement Technology Conference, Vol. 1, Budapest, Hungary, 21–23 May 2001, 96–101.

인용 양식

Dr. Erol Kalkan, P.E. (2024). spikeRemoval (https://www.mathworks.com/matlabcentral/fileexchange/69614-spikeremoval), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2018b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Histograms에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
2.1.0

Updated references

2.0.9

Replaced diff with nth order central difference function.
Updated notes

2.0.8

Updated notes

2.0.7

Updated notes

2.0.6

Added return -1 if no spike found

2.0.5

Added output array for indices of spikes, their values and replacements (thanks to Dr. Ayal Anis)
Added "delete" option to "method" to replace spikes (outliers) with "NaN" (thanks to Dr. Ayal Anis)
Added nanmean and nanstd (thanks to Jan Glscher)

2.0.4

Comments are updated

2.0.3

Excluded spike in spike search window for mean and standard deviation computation; bug fix for spike search in the beginning and end regions of the input array.

2.0.2

Modified comments

2.0.1

Reference added, description updated

2.0.0

Code re-organized to eliminate the wrapper.
"varargin" was added to give flexibility.
All global variables were removed.

1.0.0