From e65f0d11c1b720c1c1bb2f59afd69a1fb65a6032 Mon Sep 17 00:00:00 2001 From: Ryuichi Yamamoto Date: Sat, 25 Sep 2021 01:08:32 +0900 Subject: [PATCH] Fix for https://twitter.com/moai_ap/status/1441218012443394049 --- notebooks/ch04_Python-SP.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notebooks/ch04_Python-SP.ipynb b/notebooks/ch04_Python-SP.ipynb index d8ceacd..6bc9e0d 100644 --- a/notebooks/ch04_Python-SP.ipynb +++ b/notebooks/ch04_Python-SP.ipynb @@ -481,7 +481,7 @@ "logX = 20*np.log10(X)\n", "\n", "fig, ax = plt.subplots(1, 2, figsize=(10, 4), sharex=True)\n", - "freq = np.arange(len(X)) * sr / 2 / len(X)\n", + "freq = np.arange(len(X)) / 2 / len(X) * sr\n", "ax[0].plot(freq, X)\n", "ax[0].set_title(\"Amplitude spectrum\")\n", "ax[0].set_xlim(0, sr // 2)\n",