This is a pseudo-mirror of www.bores.com DSP intro at http://www.bores.com/courses/intro/time/2_ave.htm [sic] as per the policy of this site.
This mirror was created from the source on 03/08/2000 at 22:46 Central Time.
Commercial information, time-dependent information, and all the damn JAVA scripts have been removed. All "htm" extensions have been changed to the proper "html" extensions. Has also been edited for
coherence, proper-linkage, and better document flow.
Copied without permission.
Correlation is a weighted moving average:
One signal provides the weighting function.

The diagram shows how a single point of the correlation function is calculated:
Correlation requires a lot of calculations. If one signal is of length M and the other is of length N, then we need (N * M) multiplications, to calculate the whole correlation function.
Note that really, we want to multiply and then accumulate the result - this is typical of DSP operations and is called a 'multiply/accumulate' operation. It is the reason that DSP processors can do multiplications and additions in parallel.
Last updated: 5th March 1998 | http://www.bores.com/courses/intro/time/2_ave.htm