Kalman-and-Bayesian-Filters.../experiments/test1d.py
Roger Labbe 51c9a8283e Wholesale changes to connect chapters together.
I made a lot of changes so that each chapter makes clear that
they are all implementing the same basic bayesian algorithm.

This required a lot of editting, and it doesn't make sense to
try to do that atomically, hence this huge check in.

I made a lot of edits, and haven't copy editted anything. i'm
sure I introduced a lot of problems and discontinuities.
2015-06-20 15:52:16 -07:00

26 lines
286 B
Python

# -*- coding: utf-8 -*-
"""
Created on Thu Jun 18 09:16:54 2015
@author: rlabbe
"""
from filterpy.kalman import KalmanFilter
kf = KalmanFilter(1, 1)
kf.x[0,0] = 1.
kf.P = np.ones((1,1))
kf.H = np.array([[2.]])
kf.F = np.ones((1,1))
kf.R = 1
kf.Q = 0
kf.predict()
kf.update(2)