Remove unnecessary condition.

pac-components
Stéphane Adjemian (Ryûk) 2021-09-15 12:53:27 +02:00
parent 60c8ed1948
commit 32b8d6c72a
Signed by: stepan
GPG Key ID: 295C1FE89E17EB3C
1 changed files with 5 additions and 2 deletions

View File

@ -43,7 +43,7 @@ if isempty(ide)
end
if ~isempty(ide)
if isfield(M_.pac.(pacmodel).equations.(eqtag), 'additive') && length(M_.pac.(pacmodel).equations.(eqtag).additive.vars)>1
if isfield(M_.pac.(pacmodel).equations.(eqtag), 'additive')
if ~isfield(M_.pac.(pacmodel).equations.(eqtag).additive, 'bgp')
M_.pac.(pacmodel).equations.(eqtag).additive.bgp = zeros(1, length(M_.pac.(pacmodel).equations.(eqtag).additive.params));
end
@ -91,4 +91,7 @@ if ~isempty(ide)
warning('%s is not an exogenous variable in equation %s.', variable, paceq)
else
error('Endogenous/Exogenous variable %s is unknown.', variable)
end
end
function