From 2527b7b6eff1f013ad7827c0da676e66e87cc270 Mon Sep 17 00:00:00 2001 From: leo Date: Wed, 15 Mar 2023 20:13:09 +0100 Subject: [PATCH] p1: add exm stuff --- p1/p1/funcs.py | 4 ++++ 1 file changed, 4 insertions(+) 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')