Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dóra Kocsis
dynare
Commits
859335b3
Commit
859335b3
authored
Mar 03, 2012
by
Stéphane Adjemian
Browse files
Fixed bug in extended path routine (appearing when some innovations have zero variance).
parent
e882a2ea
Changes
1
Hide whitespace changes
Inline
Side-by-side
matlab/ep/extended_path.m
View file @
859335b3
...
...
@@ -146,7 +146,7 @@ covariance_matrix = M_.Sigma_e(positive_var_indx,positive_var_indx);
covariance_matrix_upper_cholesky
=
chol
(
covariance_matrix
);
% (re)Set exo_nbr
exo_nbr
=
effective_number_of_shocks
;
%
exo_nbr = effective_number_of_shocks;
% Set seed.
if
options_
.
ep
.
set_dynare_seed_to_default
...
...
@@ -267,9 +267,8 @@ while (t<sample_size)
% If the previous call to the perfect foresight model solver exited
% announcing that the routine converged, adapt the size of endo_simul_1
% and exo_simul_1.
endo_simul_1
=
[
endo_simul_1
,
repmat
(
steady_state
,
1
,
ep
.
step
)];
endo_simul_1
(:,
t
+
1
)
=
tmp
;
exo_simul_1
=
[
exo_simul_1
;
zeros
(
ep
.
step
,
size
(
shocks
,
2
))];
endo_simul_1
=
[
tmp
,
repmat
(
steady_state
,
1
,
ep
.
step
)
];
exo_simul_1
=
[
exo_simul_1
;
zeros
(
ep
.
step
,
exo_nbr
)];
%size(shocks,2)) ];
tmp_old
=
tmp
;
else
% If the previous call to the perfect foresight model solver exited
...
...
@@ -278,7 +277,7 @@ while (t<sample_size)
% to know where the routine did stop, even if convergence was not
% achieved.
endo_simul_1
=
[
endo_simul_1
,
repmat
(
steady_state
,
1
,
ep
.
step
)
];
exo_simul_1
=
[
exo_simul_1
;
zeros
(
ep
.
step
,
size
(
shocks
,
2
))
];
exo_simul_1
=
[
exo_simul_1
;
zeros
(
ep
.
step
,
exo_nbr
)];
%
size(shocks,2)) ];
end
% Solve the perfect foresight model with an increased number of periods.
if
bytecode_flag
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment