Skip to content

Chapter 1: g-h filter mistake in equation? #369

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
patrick-llgc opened this issue Feb 13, 2021 · 1 comment
Open

Chapter 1: g-h filter mistake in equation? #369

patrick-llgc opened this issue Feb 13, 2021 · 1 comment

Comments

@patrick-llgc
Copy link

First of all, thanks for the wonderful book, and I am enjoying every line of your witty and clear writing.

In session Exercise: The Effect of Acceleration, there seems to be a mistake in the formulation of the equation.

In gen_data function,

def gen_data(x0, dx, count, noise_factor, accel=0.):
    zs = []
    for i in range(count):
        zs.append(x0 + accel * (i**2) / 2 + dx*i + randn()*noise_factor)
        dx += accel
    return zs

There should be no need for the dx += accel line as the line above already accounts for the speed change in the quadratic accel term. In other words, the displacement x = x0 + v0 * t + 1/2 * a * t**2.

@PebetoUofC
Copy link
Contributor

See #381

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants