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",