comparison Code/Descriptors/yin/private/rsmooth.m @ 0:ea0c737c6323

first commit
author Dawn Black <dawn.black@eecs.qmul.ac.uk>
date Thu, 26 Jul 2012 14:46:25 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:ea0c737c6323
1 %y=rsmooth(x,smooth,npasses,trim) - smooth by running convolution
2 %
3 % X: input matrix
4 % SMOOTH: samples - size of square smoothing window
5 % NPASSES: number of smoothing passes (default=1)
6 % TRIM: if true, clip Y to same size as X
7 %
8 % Y: output matrix
9 %
10 % RSMOOTH smooths each column of matrix X by convolution with a square window
11 % followed by division by the window size.
12 % Multiple passes allow smoothing with a triangular window (npasses=2), or
13 % window shapes that approach a gaussian (npasses large). Convolution is
14 % implemented as a running sum for speed.
15 %
16 % Y has NPASSES*(SMOOTH-1) more rows than X unless TRIM is set.
17 %
18 % mex function