Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def correlation_h2(x, y, t):
- q = len(x); c = 0
- for j in xrange(q):
- if x[j] == y[(j - t)%q]:
- c += 1
- return c
- x = [1, 4, 5 ,5 ,2 ,7 ,3 ,5 ,8 ,3 ,2 ,4 ,2, 1, 7, 6 ,6 ,0 ,4, 8, 6, 3, 8, 0, 7, 0]
- q = len(x)
- print ([correlation_h2(x, x, i) for i in xrange(1,q-1)])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement