






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







X 0 Xt-1 Xt z 0 zt-1 zt X 0 Xt-1 Xt Xt+1 XT z 0 zt-1 zt zt+1 zT
n Generally, recursively compute:
t+
t
t
t
n A = [ 0.99 0.0074; -0.0136 0.99]; C = [ 1 1 ; -1 +1];" n x(:,1) = [-3;2];" n Sigma_w = diag([.3 .7]); Sigma_v = [2 .05; .05 1.5];" n w = randn(2,T); w = sqrtm(Sigma_w)w; v = randn(2,T); v = sqrtm(Sigma_v)v;" n for t=1:T-1" " x(:,t+1) = A * x(:,t) + w(:,t);" " z(:,t) = C*x(:,t) + v(:,t);" "end" n % now recover the state from the measurements " n P_0 = diag([100 100]); x0 =[0; 0];" n % run Kalman filter and smoother here n % + plot Matlab code data generation example