Commit 83015071 authored by michel's avatar michel

v3: -dr1.m: corrected bug for models with exogenous deterministic variables

    -forecast.m: dealing with case when options_.periods < size(ex_det_,1)



git-svn-id: https://www.dynare.org/svn/dynare/dynare_v3@585 ac1d8469-bf42-47a9-8791-bf33cf982152
parent 291c087d
......@@ -177,7 +177,7 @@ b11 = b(1:nstatic,nstatic+1:end);
b2 = b(nstatic+1:end,nstatic+1:end);
nz = nnz(iy_);
if exo_nbr
fu = aa(:,nz+1:end);
fu = aa(:,nz+[1:exo_nbr]);
end
clear aa;
......
......@@ -19,10 +19,12 @@ function forecast(var_list)
if exo_det_nbr == 0
[yf,var_yf] = forcst(dr_,y0,options_.periods,var_list);
else
ex = zeros(options_.periods,exo_nbr);
if options_.periods > size(ex_det_,1)
ex = zeros(options_.periods,exo_nbr);
ex_det_ = [ ex_det_; repmat(exe_det_',options_.periods- ...
size(ex_det_,1),1)];
elseif options_.periods < size(ex_det_,1)
ex = zeros(size(ex_det_,1),exo_nbr);
end
[yf,int_width] = simultxdet(y0,dr_,ex,ex_det_,options_.order, ...
var_list);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment