Kalman-and-Bayesian-Filters.../noise.py
Roger Labbe 8305200ff0 A lot of changes. I think a lot of changes to the notebooks are just
due to running them. In the process of adding a bunch of new .py
scripts to support the book. Most important is the DiscreteBayes1D.py
class, which implements a Discrete Bayesian filter in a generalized way.
2014-05-02 21:49:35 -05:00

13 lines
236 B
Python

# -*- coding: utf-8 -*-
"""
Created on Fri May 2 10:28:27 2014
@author: rlabbe
"""
import numpy.random
def white_noise (sigma2=1.):
return sigma2 * numpy.random.randn()
if __name__ == "__main__":
assert white_noise(.0) == 0.