From 966d9797dd28815111c162ea00e4ff47de6d8b4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Adjemian=28Charybdis=29?= Date: Tue, 29 May 2018 12:08:37 +0200 Subject: [PATCH] Fixed columns ordering in VAR AR matrices. --- matlab/get_ar_ec_matrices.m | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/matlab/get_ar_ec_matrices.m b/matlab/get_ar_ec_matrices.m index 7415939d5..f095e6612 100644 --- a/matlab/get_ar_ec_matrices.m +++ b/matlab/get_ar_ec_matrices.m @@ -154,8 +154,13 @@ for i = 1:length(rhsvars) end end end -end +% Temporary bug fix (ordering of the variables in the VAR model) +[a,b,c] = intersect(M_.var.toto.lhs, oo_.var.toto.ar_idx, 'stable') +oo_.var.toto.ar_idx = oo_.var.toto.ar_idx(c); +oo_.var.toto.ar = oo_.var.toto.ar(:,c,:); + +end function lhsvaridx = findLhsInAuxVar(auxVar, lhsvars)