Mercurial > hg > emotion-detection-top-level
comparison Code/Descriptors/yin/private/src/rdiff_inplace.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 % rdiff_inplace(x,y,d,lags,n) - in place running cross-difference function | |
2 % | |
3 % x: column vector | |
4 % y: column vector | |
5 % r: result matrix (time X lag) | |
6 % lags: 2-column matrix of lags | |
7 % n: (samples) frame-rate & window size (default=1) | |
8 % | |
9 % Vectors x and y are each delayed by amounts specified by lags and subtracted | |
10 % sample to sample. The difference is squared and added over a time window | |
11 % of n samples. This processing is repeated every n samples, as many times | |
12 % as there are columns in r. | |
13 % | |
14 % A positive lag applied to x causes it to be delayed with respect to y. | |
15 % A positive lag applied to y causes it to be delayed with respect to x. | |
16 % The number of rows of r must match that of lags. | |
17 % | |
18 % Mex function. | |
19 % Beware: input arguments are assigned to. This is not matlab-kosher! |