Angular Fast Smooth - NaN Tolerant

버전 1.0.0.0 (2.89 KB) 작성자: Greg Pittam
Fast smoothing algorithm for angles that is tolerant of NaNs in the data
다운로드 수: 213
업데이트 날짜: 2015/8/26

라이선스 보기

nanfastsmoothAngle is a function of the form y = fastsmoothAngle(x,w,type,tol) where y becomes a smoothed version of x using a moving average function of width w where NaNs in the data are ignored. This function is specifically for angles and avoids the usual problem of trying to average angles such as 10 and 350 where a normal average would be 180 but the angular average is 0 or 360.
The argument "type" determines the smooth type:
If type=1, rectangular (sliding-average or boxcar)
If type=2, triangular (2 passes of sliding-average)
If type=3, pseudo-Gaussian (3 passes of sliding-average)
The argument "tol" controls the amount of tolerance to NaNs allowed between 0and 1. A value of zero means that if the window has any NaNs in it then the output is set as NaN. A value of 1 allows any number of NaNs in the window and will still give an answer for the smoothed signal. A value of 0.5 means that there must be at least half real values in the window for the output to be valid.

The start and end of the file are treated as if there are NaNs beyond the dataset. As such the behaviour depends on the value of 'tol' as described above. With 'tol' set at 0.5 the smoothed signal will start and end at the same time as the orgional signal. However it's accuracy will be reduced and the moving average will become more and more one-sided as the beginning and end is approached.

fastsmoothAngle(Y,w,type) smooths with tol = 0.5.
fastsmoothAngle(Y,w) smooths with type = 1 and tol = 0.5

Written using Matlab 2013b but should work with older releases

This file is heavily based on the fastsmooth function by T. C. O'Haver, May, 2008.

인용 양식

Greg Pittam (2026). Angular Fast Smooth - NaN Tolerant (https://kr.mathworks.com/matlabcentral/fileexchange/52689-angular-fast-smooth-nan-tolerant), MATLAB Central File Exchange. 검색 날짜: .

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

도움 받은 파일: Fast smoothing function

버전 게시됨 릴리스 정보
1.0.0.0