You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Amazing/Inspiring work here, thank you for sharing the fruits of your research.
It does not impact the message of the section(effect of acceleration) but this code was confusing for me because it appears to be wrong if we are generating position as a function of time with constant acceleration:
for i in range(count):
zs.append(x0 + dx*i + randn()*noise_factor)
dx += accel
return zs
The calculation of position using x0 + dx*i at step i, implies that velocity was constant (at its current value) for all i up to and including the current step. This overestimates the position. A more accurate representation of the position would be yielded with:
for i in range(count):
zs.append(x0 + accel*i**2/2.0 + dx*i + randn()*noise_factor)
return zs
If there is a desire to stick with a discritized form of the motion equation, something similar to the following might be better, although there is probably a more eloquent way to write it:
zs = [x0]
for i in range(1, count):
dx += accel
zs.append(zs[-1] + dx + randn()*noise_factor)
return zs
The text was updated successfully, but these errors were encountered:
Amazing/Inspiring work here, thank you for sharing the fruits of your research.
It does not impact the message of the section(effect of acceleration) but this code was confusing for me because it appears to be wrong if we are generating position as a function of time with constant acceleration:
The calculation of position using
x0 + dx*i
at step i, implies that velocity was constant (at its current value) for all i up to and including the current step. This overestimates the position. A more accurate representation of the position would be yielded with:If there is a desire to stick with a discritized form of the motion equation, something similar to the following might be better, although there is probably a more eloquent way to write it:
The text was updated successfully, but these errors were encountered: