Skip to content

Commit 91f8010

Browse files
committed
Extra parameter in call #337
I removed dt from plot_track because it wasn't used, but didn't update the notebook. Also, for some reason plot_track_ellipses was deleted, causing another notebook error.
1 parent 885477c commit 91f8010

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

kf_book/mkf_internal.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,25 @@ def zs_var_275():
6262
return np.array([xs, zs]).T
6363

6464

65+
def plot_track_ellipses(N, zs, ps, cov, title):
66+
#bp.plot_measurements(range(1,N + 1), zs)
67+
#plt.plot(range(1, N + 1), ps, c='b', lw=2, label='filter')
68+
plt.title(title)
69+
70+
for i,p in enumerate(cov):
71+
plot_covariance_ellipse(
72+
(i+1, ps[i]), cov=p, variance=4,
73+
axis_equal=False, ec='g', alpha=0.5)
74+
75+
if i == len(cov)-1:
76+
s = ('$\sigma^2_{pos} = %.2f$' % p[0,0])
77+
plt.text (20, 5, s, fontsize=18)
78+
s = ('$\sigma^2_{vel} = %.2f$' % p[1, 1])
79+
plt.text (20, 0, s, fontsize=18)
80+
plt.ylim(-5, 20)
81+
plt.gca().set_aspect('equal')
82+
83+
6584
def plot_gaussian_multiply():
6685
xs = np.arange(-5, 10, 0.1)
6786

0 commit comments

Comments
 (0)