On Dec 2, 7:12 pm, sturlamolden wrote:
> For two 1D ndarrays, the cross-correlation is
>
> from numpy.fft import rfft, irfft
> from numpy import fliplr
>
> xcorr = lambda x,y : irfft(rfft(x)*rfft(fliplr(y)))
>
> Normalize as you wish, and preferably pad with zeros before invoking
> xcorr.
Thanks,
On 2 Des, 18:50, DarthXander wrote:
> However to do this 700 times seems ridiculous. How would I get python
> to perform this for me for t in a range of roughly 0-700?
For two 1D ndarrays, the cross-correlation is
from numpy.fft import rfft, irfft
from numpy import fliplr
xcorr = lambda x,y :
I have two data sets which I wish to perform the discrete correlation
function on and then plot the results for many values of t to see what
if any time lag exists between the data.
Thus far my code is;
import csv
import pylab
from pylab import *
from numpy import *
from numpy import array
HSBC=c