From 74acb2d1f52ca75a171e512d907ed555d1e527ab Mon Sep 17 00:00:00 2001
From: Marco Ratto <marco.ratto@ec.europa.eu>
Date: Fri, 18 Nov 2022 12:44:37 +0100
Subject: [PATCH] bug fix using index t

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

diff --git a/matlab/missing_DiffuseKalmanSmootherH1_Z.m b/matlab/missing_DiffuseKalmanSmootherH1_Z.m
index 09d5672637..3cbc664d6f 100644
--- a/matlab/missing_DiffuseKalmanSmootherH1_Z.m
+++ b/matlab/missing_DiffuseKalmanSmootherH1_Z.m
@@ -150,7 +150,7 @@ if rank(Pinf(:,:,1),diffuse_kalman_tol)
     Pinf_init = Pinf(:,:,1);
     Pstar_init = Pstar(:,:,1);
     a_init = a(:,1);
-    a(:,t)        = T*a(:,t);
+    a(:,1)        = T*a(:,1);
     % only non-stationary part is affected by following line, 
     % hence Pstar on EXIT from diffuse step will NOT change.
     Pstar(:,:,1)  = T*Pstar(:,:,1)*T' + QQ;
-- 
GitLab