From ede5b5e4c01e98488590da794a83dff983aa49d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Charybdis=29?= Date: Fri, 3 May 2019 16:15:54 +0200 Subject: [PATCH] Ensure that the variable names are unique. --- matlab/aggregate.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/matlab/aggregate.m b/matlab/aggregate.m index 86b53f19e..5bd047fba 100644 --- a/matlab/aggregate.m +++ b/matlab/aggregate.m @@ -1,4 +1,4 @@ -function agregate(ofile, varargin) +function aggregate(ofile, varargin) % Agregates cherry-picked models. @@ -142,6 +142,8 @@ if ~isequal(length(i1),rows(eqlist)) end i2 = setdiff(1:rows(elist), i1); xlist = [xlist; elist(i2,:)]; +[~,idx] = unique(xlist(:,1)); % Ensure that the exogenous variable names are unique. +xlist=[xlist(idx,1) xlist(idx,2)]; % We do not test that the tags are the same. elist = elist(i1,:); % Print all cherry-picked models in one mod-file.