smooth

Perform windowed smoothing on a vector using mathematical functions
다운로드 수: 2.5K
업데이트 날짜: 2018/5/5

NOTE: this function is now available from the IoSR Matlab Toolbox as iosr.dsp.vsmooth.
-------------------------
SMOOTH Perform windowed smoothing on a vector using mathematical functions

SYNTAX

Y = smooth(X,FRAME)
Y = smooth(X,FRAME,MODE)

DESCRIPTION

Y = smooth(X,FRAME) smooths the input vector X by calculating the running RMS over a series of frames. FRAME specifies the frame characteristics; it can be set to:

a scalar - this will be used as the length of the frame, the window will be rectangular
a vector - this specifies the shape of the analysis window, the frame length will be length(frame).

Y = smooth(X,FRAME,MODE) allows the user to specify a different mathematical smoothing function. The options are:

'rms' - calculates the running rms (default)
'mean' - calculates the running mean (moving average filter)
'median' - calculates the running median

NOTE: SMOOTH uses a vectorized implementation that may be slow when X and/or FRAME_LENGTH are very large. The number of elements that are used for calculation is length(X)*FRAME_LENGTH. The algorithm vectorizes the operation by creating a matrix of indexes and extracting its diagonals. E.g. for a vector of length 4 and frame_length of 2, the algorithm creates a temporary zero-padded matrix x2 from which it creates a set of indexes:

1 1
2 2
3 3
4 4
5 5
6 6

It then extracts the diagonals where -length(x2)+frame_length<=k<=0, yielding:

1 2
2 3
3 4
4 5

this is used to index x2; operations are then performed along the rows.

인용 양식

Christopher Hummersone (2024). smooth (https://github.com/IoSR-Surrey/MatlabToolbox), GitHub. 검색됨 .

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

Community Treasure Hunt

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

Start Hunting!

GitHub 디폴트 브랜치를 사용하는 버전은 다운로드할 수 없음

버전 게시됨 릴리스 정보
1.0.0.0

Migrated to GitHub.

이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.
이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.