Created
June 9, 2017 20:13
-
-
Save jchuahtacc/6e25a355bd04477e83f949e3c7383b60 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
segments = 5 | |
accels = [ 0, 1, 2, 3, 4 ] | |
vs = [ 0, 0.5, 1, 1.5, 2 ] | |
import numpy as np | |
%matplotlib inline | |
import matplotlib.pyplot as plt | |
ts = [ np.linspace(t * 100, t * 100 + 99, 10) for t in range(5)] | |
ys = [ 0.5 * np.square(ts[i]) * accels[i] + ts[i] * vs[i] for i in range(5) ] | |
fig = plt.figure() | |
ax1 = fig.add_subplot(111) | |
for i in range(5): | |
ax1.scatter(ts[i], ys[i]) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here's what I had: