From 499481e889f9683260dc1d4acc65bf7a5bc3fb92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Charybdis=29?= Date: Fri, 19 Jul 2019 16:51:16 +0200 Subject: [PATCH] Fixed bug. aggregate was crashing in the absence of tags on the endogenous or exogenous variables. --- matlab/aggregate.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/matlab/aggregate.m b/matlab/aggregate.m index cf62a0d12..8a5382d1b 100644 --- a/matlab/aggregate.m +++ b/matlab/aggregate.m @@ -161,7 +161,7 @@ else end fprintf(fid, 'var\n'); for i=1:rows(elist) - if isempty(elist{i,2}) + if size(elist,2)==1 || isempty(elist{i,2}) fprintf(fid, '\t%s\n', elist{i,1}); else fprintf(fid, '\t%s %s\n', elist{i,1}, elist{i,2}); @@ -180,7 +180,7 @@ if ~isempty(xlist) fprintf(fid, '\n\n'); fprintf(fid, 'varexo\n'); for i=1:rows(xlist) - if isempty(xlist{i,2}) + if size(xlist,2)==1 || isempty(xlist{i,2}) fprintf(fid, '\t%s\n', xlist{i,1}); else fprintf(fid, '\t%s %s\n', xlist{i,1}, xlist{i,2});