Fix condition (variable name can have less than characters).
parent
66abd09b87
commit
a0d53277c1
|
@ -9,7 +9,7 @@ function str = print_equations(variable_name, withexpansion)
|
|||
% OUTPUTS
|
||||
% None
|
||||
|
||||
% Copyright © 2019-2021 Dynare Team
|
||||
% Copyright © 2019-2023 Dynare Team
|
||||
%
|
||||
% This file is part of Dynare.
|
||||
%
|
||||
|
@ -65,7 +65,7 @@ for it = 1:length(M_.mapping.(variable_name).eqidx)
|
|||
% Equations appended by the preprocessor for auxiliary variables are not displayed, except if it is an aux variable
|
||||
% for the PAC expectation.
|
||||
% TODO Probably should do the same for VAR expectation.
|
||||
if isfield(M_, 'lhs') && isequal(M_.lhs{M_.mapping.(variable_name).eqidx(it)}(1:16), 'pac_expectation_')
|
||||
if isfield(M_, 'lhs') && length(M_.lhs{M_.mapping.(variable_name).eqidx(it)})>15 && isequal(M_.lhs{M_.mapping.(variable_name).eqidx(it)}(1:16), 'pac_expectation_')
|
||||
id = M_.mapping.(M_.lhs{M_.mapping.(variable_name).eqidx(it)}).eqidx(1);
|
||||
else
|
||||
continue
|
||||
|
|
Loading…
Reference in New Issue