Ensure that the variable names are unique.

time-shift
Stéphane Adjemian (Charybdis) 2019-05-03 16:15:54 +02:00
parent fc4e6b2b8c
commit ede5b5e4c0
1 changed files with 3 additions and 1 deletions

View File

@ -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.