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
8eb6284b
Commit
8eb6284b
authored
Nov 29, 2012
by
Stéphane Adjemian
Browse files
Fixed bug (the name of the covariance matrix changed in previous commit).
parent
2ff996d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
matlab/solve_stochastic_perfect_foresight_model.m
View file @
8eb6284b
...
...
@@ -43,7 +43,7 @@ function [flag,endo_simul,err] = solve_stochastic_perfect_foresight_model(endo_s
[
nodes
,
weights
]
=
gauss_hermite_weights_and_nodes
(
nnodes
);
if
number_of_shocks
>
1
nodes
=
repmat
(
nodes
,
1
,
number_of_shocks
)
*
chol
(
pfm
.
Sigma
_e
);
nodes
=
repmat
(
nodes
,
1
,
number_of_shocks
)
*
chol
(
pfm
.
Sigma
);
% to be fixed for Sigma ~= I
for
i
=
1
:
number_of_shocks
rr
(
i
)
=
{
nodes
(:,
i
)};
...
...
@@ -53,7 +53,7 @@ function [flag,endo_simul,err] = solve_stochastic_perfect_foresight_model(endo_s
weights
=
prod
(
cartesian_product_of_sets
(
ww
{:}),
2
);
nnodes
=
nnodes
^
number_of_shocks
;
else
nodes
=
nodes
*
sqrt
(
pfm
.
Sigma
_e
);
nodes
=
nodes
*
sqrt
(
pfm
.
Sigma
);
end
innovations
=
zeros
(
periods
+
2
,
number_of_shocks
);
...
...
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