diff --git a/p1/p1/funcs.py b/p1/p1/funcs.py index fb0222a..f66cfc3 100644 --- a/p1/p1/funcs.py +++ b/p1/p1/funcs.py @@ -172,6 +172,10 @@ def plot_mutual_correlation(d1: pd.DataFrame, d2: pd.DataFrame, fname: str = 'xy def plot_autocorrelation(dat: pd.DataFrame, fname: str = 'x', colour: str = '#1f77b4'): d = auto_correlation(dat.tolist()) + # exm. TODO: check against matlab. + # z = pd.Series([.4, .5, .23, 2.5, -3.6, .4, -0.12, 2.2, 0.02, 14.4]) + # a = auto_correlation(z.tolist()) + # print(a) pyplt.plot(range(0, len(d)), d, color=colour) pyplt.title('Autocorrelation of ' + fname + ' (R' + fname + fname + ')') pyplt.xlabel('shift')