v4 steady_.m: exo_simula and exo_det_simul are passed in x to _steady function
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@593 ac1d8469-bf42-47a9-8791-bf33cf982152time-shift
parent
e62b80c658
commit
a24bd3449d
|
@ -9,25 +9,20 @@ function steady_()
|
|||
xlen = M_.maximum_lag + M_.maximum_lead + 1 ;
|
||||
nn = size(M_.lead_lag_incidence,2) ;
|
||||
it_ = M_.maximum_lag+1 ;
|
||||
temp = oo_.exo_simul ;
|
||||
oo_.exo_simul = ones(xlen,1)*transpose(oo_.exo_steady_state);
|
||||
x = repmat(oo_.exo_steady_state',xlen,1);
|
||||
|
||||
if M_.exo_det_nbr > 0
|
||||
tempdet = oo_.exo_det_simul ;
|
||||
oo_.exo_det_simul = repmat(oo_.exo_det_steady_state',M_.maximum_lag+1,1) ;
|
||||
x = [x, repmat(oo_.exo_det_steady_state',M_.maximum_lag+1,1)] ;
|
||||
end
|
||||
|
||||
if exist([M_.fname '_steadystate'])
|
||||
[oo_.steady_state,check] = feval([M_.fname '_steadystate'],x);
|
||||
[oo_.steady_state,check] = feval([M_.fname '_steadystate'],oo_.steady_state,x);
|
||||
else
|
||||
[oo_.staedy_state,check] = dynare_solve([M_.fname '_static'],x);
|
||||
[oo_.staedy_state,check] = dynare_solve([M_.fname '_static'],oo_.steady_state,x);
|
||||
end
|
||||
|
||||
if check ~= 0
|
||||
error('STEADY: convergence problems')
|
||||
end
|
||||
|
||||
if M_.exo_det_nbr > 0
|
||||
oo_.exo_det_simul = tempdet;
|
||||
end
|
||||
oo_.exo_simul = temp ;
|
||||
|
||||
|
|
Loading…
Reference in New Issue