histval: replaced initialization with NaN by zeros
parent
0d7e349187
commit
b8194f7845
|
@ -53,6 +53,6 @@ else
|
||||||
end
|
end
|
||||||
% the first NaNs take care of the case where there are lags > 1 on
|
% the first NaNs take care of the case where there are lags > 1 on
|
||||||
% exogenous variables
|
% exogenous variables
|
||||||
oo_.endo_simul = [NaN(M_.endo_nbr,M_.maximum_lag-1) M_.endo_histval ...
|
oo_.endo_simul = [M_.endo_histval ...
|
||||||
oo_.steady_state*ones(1,options_.periods+M_.maximum_lead)];
|
oo_.steady_state*ones(1,options_.periods+M_.maximum_lead)];
|
||||||
end
|
end
|
||||||
|
|
|
@ -274,7 +274,7 @@ HistValStatement::writeOutput(ostream &output, const string &basename, bool mini
|
||||||
output << "%" << endl
|
output << "%" << endl
|
||||||
<< "% HISTVAL instructions" << endl
|
<< "% HISTVAL instructions" << endl
|
||||||
<< "%" << endl
|
<< "%" << endl
|
||||||
<< "M_.endo_histval = zeros(M_.endo_nbr,M_.maximum_endo_lag);" << endl;
|
<< "M_.endo_histval = zeros(M_.endo_nbr,M_.maximum_lag);" << endl;
|
||||||
|
|
||||||
for (hist_values_t::const_iterator it = hist_values.begin();
|
for (hist_values_t::const_iterator it = hist_values.begin();
|
||||||
it != hist_values.end(); it++)
|
it != hist_values.end(); it++)
|
||||||
|
@ -310,7 +310,7 @@ HistValStatement::writeOutput(ostream &output, const string &basename, bool mini
|
||||||
int tsid = symbol_table.getTypeSpecificID(symb_id) + 1;
|
int tsid = symbol_table.getTypeSpecificID(symb_id) + 1;
|
||||||
|
|
||||||
if (type == eEndogenous)
|
if (type == eEndogenous)
|
||||||
output << "M_.endo_histval( " << tsid << ", M_.maximum_endo_lag + " << lag << ") = ";
|
output << "M_.endo_histval( " << tsid << ", M_.maximum_lag + " << lag << ") = ";
|
||||||
else if (type == eExogenous)
|
else if (type == eExogenous)
|
||||||
output << "oo_.exo_simul( M_.maximum_lag + " << lag << ", " << tsid << " ) = ";
|
output << "oo_.exo_simul( M_.maximum_lag + " << lag << ", " << tsid << " ) = ";
|
||||||
else if (type != eExogenousDet)
|
else if (type != eExogenousDet)
|
||||||
|
|
Loading…
Reference in New Issue