# Correlation between 2 functions

I have a periodical function $f(x)$ that is sampled in time, at a rate of 1 millisecond.

Together with this, I also have a second function $t(x)$.

I want to find the correlations between periods of the first function and the second function $t(x)$.

How can I approach this issue?

• There is no such predefined thing as "correlation between periods". You can compute a correlation function for your two functions. – mbaitoff Mar 25 '13 at 16:55
• Do you have samples of the second function too? Are they sampled at the same rate? Are the functions' periods the same? – Jim Clay Mar 26 '13 at 11:55
• yes, I have samples of the second function, and no, they have diff periods – Corovei Andrei Mar 26 '13 at 11:58
• @CoroveiAndrei: is period of one of the functions known? – mbaitoff May 26 '13 at 5:27
• I'm new to DSP, but what about wavelet coherence (or squared coherence)? – Jase May 26 '13 at 6:29

If you want to merely compare the periods of the functions $f_1$ and $f_2$, you could use the following "metric" (it might not technically be one if it disobeys the triangle inequality, but someone else will have to check for that):
$\Delta (f_1, f_2) \equiv \dfrac{\left| T_1 - T_2 \right|}{\max {T_1, T_2}}$
Then the similarity can simply be defined as $s(f_1, f_2) \equiv 1-\Delta(f_1, f_2)$