Skip to content

Instantly share code, notes, and snippets.

View ivan-pi's full-sized avatar

Ivan Pribec ivan-pi

View GitHub Profile
@ivan-pi
ivan-pi / kalman.f90
Last active October 24, 2018 08:19 — forked from mrocklin/kalman.f90
Kalman filter in BLAS/LAPACK Fortran; see [blogpost](http://matthewrocklin.com/blog/work/2012/11/24/Kalman-Filter) for more information
subroutine f(mu, Sigma, H, INFO, R, Sigmavar_2, data, muvar_2, k, n)
implicit none
integer, intent(in) :: k
integer, intent(in) :: n
real*8, intent(in) :: Sigma(n, n) ! Sigma
real*8, intent(in) :: H(k, n) ! H
real*8, intent(in) :: mu(n) ! mu
real*8, intent(in) :: R(k, k) ! R, H*Sigma*H' + R
real*8, intent(in) :: data(k) ! (H*Sigma*H' + R)^-1*((-1)*data + H*mu), data, (-1)* data + H*mu