Hello all,
I like to compare two sample points and I recently found ALGLIB implementation of Cross Correlation. However, I just wanted to write a simple test program to see what the results would give me. I did research and read up on Cross-Correlation but I am still kind of confused as to how to read the results. Can anyhow help me?
Here is my sample program:
int main(int argc, char *argv[]) { double signalData[SIGNAL_SIZE] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; double patternData[PATTERN_SIZE] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; real_1d_array signal; real_1d_array pattern; real_1d_array corrResult;
signal.setcontent(SIGNAL_SIZE, signalData); pattern.setcontent(PATTERN_SIZE, patternData);
corrr1d(signal, SIGNAL_SIZE, pattern, PATTERN_SIZE, corrResult);
double *d = corrResult.getcontent();
return 0; }
Now, what I get back from the results is the following.
[0] 285.00000000000000 double [1] 240.00000000000000 double [2] 196.00000000000000 double [3] 154.00000000000000 double [4] 115.00000000000000 double [5] 80.000000000000000 double [6] 50.000000000000000 double [7] 26.000000000000000 double [8] 9.0000000000000000 double [9] 0.00000000000000000 double [10] 0.00000000000000000 double [11] 9.0000000000000000 double [12] 26.000000000000000 double [13] 50.000000000000000 double [14] 80.000000000000000 double [15] 115.00000000000000 double [16] 154.00000000000000 double [17] 196.00000000000000 double [18] 240.00000000000000 double
|