Correlation of oscillatory behaviour in Matlab using wavelets