From a3867a0b34b0c7cc401ce476098d75802bc013e0 Mon Sep 17 00:00:00 2001 From: Houtan Bastani Date: Mon, 11 Feb 2019 16:31:46 +0100 Subject: [PATCH] put_in_sur_form: fix bug in cross equation restriction --- matlab/ols/put_in_sur_form.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matlab/ols/put_in_sur_form.m b/matlab/ols/put_in_sur_form.m index cbf1bb9bb..7ed8fe35b 100644 --- a/matlab/ols/put_in_sur_form.m +++ b/matlab/ols/put_in_sur_form.m @@ -76,7 +76,7 @@ for i = 1:neqs end end for j = length(to_remove):-1:1 - Xtmp = Xtmp.remove(Xtmp.name{j}); + Xtmp = Xtmp.remove(Xtmp.name{to_remove(j)}); end if ~isempty(Xtmp) Xmat = [Xmat Xtmp];