From c8bc12ab6c971348c5ca6ba6359a9e8a833ba2b6 Mon Sep 17 00:00:00 2001
From: Johannes Pfeifer <jpfeifer@gmx.de>
Date: Wed, 12 May 2021 17:44:35 +0200
Subject: [PATCH] forcst.m: fix case with measurement error

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

diff --git a/matlab/forcst.m b/matlab/forcst.m
index 4aa28230b6..ffa992cb35 100644
--- a/matlab/forcst.m
+++ b/matlab/forcst.m
@@ -85,7 +85,7 @@ for i = 1:horizon
 end
 if nargout==3
     var_yf_ME=var_yf;
-    [loc_H, loc_varlist] = ismember(options_.varobs', options_.varlist);
+    [loc_H, loc_varlist] = ismember(options_.varobs, var_list);
     loc_varlist(loc_varlist==0) = [];
     if ~isempty(loc_varlist)
         var_yf_ME(:,loc_varlist) = var_yf(:,loc_varlist)+repmat(diag(M_.H(loc_H,loc_H))', horizon, 1);
-- 
GitLab