DSPRelated.com
Forums

C code on Circular Cross correlation of two arrays & interpretation - anyone can post it from Numerical Receipies in C or another?

Started by Unknown February 1, 2015
I am looking for a C Program on Circular Cross correlation of two arrays - anyone can post it from Numerical Receipies in C?

I did write function and there is a strange bug - just including a printf after the computation alters the values from second index onwards!

Secondly, once Circular Cross correlation of two arrays are computed we know at that lag the peak similarity occurs - are we supposed to express that it is similar by x% at a lag of d ... I wondered there is a single similarity measure as opposed to an array of similarity measures?

Thirdly, Circular Cross correlation makes more sense than just the Cross correlation .... right?

Finally, if you do not have a Numerical Receipies in C, I appreciate if you can post a reliably working C code for it.
On Sunday, February 1, 2015 at 10:57:54 AM UTC-8, speec...@gmail.com wrote:
> I am looking for a C Program on Circular Cross correlation of two arrays - anyone can post it from Numerical Receipies in C? > > I did write function and there is a strange bug - just including a printf after the computation alters the values from second index onwards! > > Secondly, once Circular Cross correlation of two arrays are computed we know at that lag the peak similarity occurs - are we supposed to express that it is similar by x% at a lag of d ... I wondered there is a single similarity measure as opposed to an array of similarity measures? > > Thirdly, Circular Cross correlation makes more sense than just the Cross correlation .... right? > > Finally, if you do not have a Numerical Receipies in C, I appreciate if you can post a reliably working C code for it.
Also, what are the pros and cons of using correlation coefficient itself?
Also, what are the pros and cons of using correlation coefficient itself?
Hi,

>> I did write function and there is a strange bug
chances are good that you have an array overflow in your code somewhere (writing beyond the valid range). If you can't find it by yourself, "Valgrind" on Linux helps to debug this kind of problem. This is not to encourage sloppy working standards, but it's an extremely useful tool in general, that's why I recommend it. _____________________________ Posted through www.DSPRelated.com