From 5af46bd7322f1aa9e6037e4f8e3cdb36632cfddb Mon Sep 17 00:00:00 2001 From: "Taylor D. Edwards" <92261786+Zelpuz@users.noreply.github.com> Date: Tue, 21 Jun 2022 13:51:59 -0400 Subject: [PATCH] Remove redundant "dx += accel" In Chapter 1, under "Exercise: The Effect of Acceleration", the solution utilizes the closed-form solution to the differential equations for acceleration, velocity, and displacement. Because this solution was used, there is no need to increment dx; in this solution, dx should just remain as its initial value (which we could call dx0, but I didn't change it here). --- 01-g-h-filter.ipynb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/01-g-h-filter.ipynb b/01-g-h-filter.ipynb index ee5225de..56345dea 100644 --- a/01-g-h-filter.ipynb +++ b/01-g-h-filter.ipynb @@ -1266,7 +1266,6 @@ " zs = []\n", " for i in range(count):\n", " zs.append(x0 + accel * (i**2) / 2 + dx*i + randn()*noise_factor)\n", - " dx += accel\n", " return zs\n", " \n", "predictions = []\n", @@ -2073,7 +2072,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.7" + "version": "3.10.4" }, "nbdime-conflicts": { "local_diff": [