CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

| Download
Project: test
Views: 91871
1
# -*- coding: utf-8 -*-
2
"""
3
Created on Thu Jun 18 09:16:54 2015
4
5
@author: rlabbe
6
"""
7
8
9
from filterpy.kalman import KalmanFilter
10
11
12
13
kf = KalmanFilter(1, 1)
14
kf.x[0,0] = 1.
15
kf.P = np.ones((1,1))
16
kf.H = np.array([[2.]])
17
kf.F = np.ones((1,1))
18
kf.R = 1
19
kf.Q = 0
20
21
22
23
kf.predict()
24
kf.update(2)
25
26
27