Merge remote branch 'ratto/master'
commit
d994ed35ff
|
@ -206,7 +206,7 @@ while notsteady & t<smpl
|
|||
end
|
||||
a1(:,t+1) = T*a(:,t);
|
||||
Pf = P(:,:,t);
|
||||
aK(1,:,t+1) = a1(:,t+1)
|
||||
aK(1,:,t+1) = a1(:,t+1);
|
||||
for jnk=1:nk,
|
||||
Pf = T*Pf*T' + QQ;
|
||||
PK(jnk,:,:,t+jnk) = Pf;
|
||||
|
|
|
@ -134,7 +134,7 @@ while t < smpl
|
|||
Zi = Z(i,:);
|
||||
prediction_error = Y(i,t) - Zi*a;
|
||||
Fi = Zi*Pstar*Zi'+H(i);
|
||||
if Fi > crit
|
||||
if Fi > kalman_tol
|
||||
Ki = Pstar*Zi';
|
||||
a = a + Ki*prediction_error/Fi;
|
||||
Pstar = Pstar - Ki*Ki'/Fi;
|
||||
|
|
|
@ -183,7 +183,7 @@ while t < smpl
|
|||
Zi = ZZ(i,:);
|
||||
prediction_error = Y(i,t) - Zi*a;
|
||||
Fi = Zi*Pstar*Zi'+H(i);
|
||||
if Fi > crit
|
||||
if Fi > kalman_tol
|
||||
Ki = Pstar*Zi';
|
||||
a = a + Ki*prediction_error/Fi;
|
||||
Pstar = Pstar - Ki*Ki'/Fi;
|
||||
|
|
Loading…
Reference in New Issue