From 46b44cd4815e957321a38389bdf1a45b4302d662 Mon Sep 17 00:00:00 2001
From: Johannes Pfeifer <jpfeifer@gmx.de>
Date: Mon, 14 Nov 2016 11:54:39 +0100
Subject: [PATCH] missing_DiffuseKalmanSmootherH3_Z.m: Fix typo in formula that
 makes tests fail

---
 matlab/missing_DiffuseKalmanSmootherH3_Z.m | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/matlab/missing_DiffuseKalmanSmootherH3_Z.m b/matlab/missing_DiffuseKalmanSmootherH3_Z.m
index 598f1c05a..e1f4deb5e 100644
--- a/matlab/missing_DiffuseKalmanSmootherH3_Z.m
+++ b/matlab/missing_DiffuseKalmanSmootherH3_Z.m
@@ -311,7 +311,7 @@ if d
                     N_0(:,:,t)=Linf'*N_0(:,:,t)*Linf;                           % DK (2012), eq. 5.19, noting that L^(0) is named Linf
                 end
             elseif Fstar(i,t) > kalman_tol % step needed whe Finf == 0
-                L_i=eye(mm) - Kstar(:,i,t)*Z(i,:)*Fstar(i,t);
+                L_i=eye(mm) - Kstar(:,i,t)*Z(i,:)/Fstar(i,t);
                 r0(:,t) = Z(i,:)'/Fstar(i,t)*v(i,t)+L_i'*r0(:,t);           % propagate r0 and keep r1 fixed
                 if state_uncertainty_flag
                     N_0(:,:,t)=Z(i,:)'/Fstar(i,t)*Z(i,:)+L_i'*N_0(:,:,t)*L_i;   % propagate N_0 and keep N_1 and N_2 fixed
-- 
GitLab