xxxxxxxxxx
''' Python only implementation '''
import matplotlib.pyplot as plt # Plotting only
# Pre-allocate correlation array
conv = (len(sig1) - len(sig2)) * [0]
# Go through lag components one-by-one
for l in range(len(conv)):
for i in range(len(sig2)):
conv[l] += sig1[l-i+len(sig2)] * sig2[i]
conv[l] /= len(sig2) # Normalize
plt.plot(conv)