Fixed aggregate if the equation tag name is not available...
... Or has special characters. In this cases we use the LHS variable as a name for the equation.time-shift
parent
bb302279ea
commit
e39c3bad5b
|
@ -79,8 +79,12 @@ for i=1:length(varargin)
|
||||||
[lhs, ~] = getequation(model{j+1});
|
[lhs, ~] = getequation(model{j+1});
|
||||||
endovar = getendovar(lhs);
|
endovar = getendovar(lhs);
|
||||||
eqtagname_ = strcat('name=''', endovar{1}, '''');
|
eqtagname_ = strcat('name=''', endovar{1}, '''');
|
||||||
if ~isequal(eqtagname{1}, eqtagname_)
|
if ~isempty(eqtagname)
|
||||||
model{j} = strrep(model{j}, eqtagname{1}, eqtagname_);
|
if ~isequal(eqtagname{1}, eqtagname_)
|
||||||
|
model{j} = strrep(model{j}, eqtagname{1}, eqtagname_);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
model{j} = eqtagname_;
|
||||||
end
|
end
|
||||||
eqlist{tagnum,4} = model{j};
|
eqlist{tagnum,4} = model{j};
|
||||||
eqtag = true;
|
eqtag = true;
|
||||||
|
@ -99,7 +103,7 @@ end
|
||||||
eqlist = eqlist(1:eqnum,:);
|
eqlist = eqlist(1:eqnum,:);
|
||||||
[~, idx] = unique(eqlist(:,1), 'stable');
|
[~, idx] = unique(eqlist(:,1), 'stable');
|
||||||
eqlist = eqlist(idx, :);
|
eqlist = eqlist(idx, :);
|
||||||
eqlist
|
|
||||||
% Get endogenous variables.
|
% Get endogenous variables.
|
||||||
elist = cell(MAX_NUMBER_OF_ELEMENTS, 2);
|
elist = cell(MAX_NUMBER_OF_ELEMENTS, 2);
|
||||||
enum = 0;
|
enum = 0;
|
||||||
|
|
Loading…
Reference in New Issue