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
e192f739
Commit
e192f739
authored
Oct 11, 2013
by
Johannes Pfeifer
Browse files
Filter out shocks specified twice for IRF generation
parent
f6cacbd4
Changes
1
Hide whitespace changes
Inline
Side-by-side
matlab/getIrfShocksIndx.m
View file @
e192f739
function
irf_shocks_indx
=
getIrfShocksIndx
()
% Copyright (C) 2011 Dynare Team
% irf_shocks_indx=getIrfShocksIndx()
% returns the unique indices of the exogenous shocks specified for IRF
% generation using the irf_shocks-command
%
% Inputs:
% none
% Outputs:
% irf_shocks_indx: [1 by n_irf_shocks] vector storing the indices
%
% Copyright (C) 2011-13 Dynare Team
%
% This file is part of Dynare.
%
...
...
@@ -26,4 +34,10 @@ else
for
i
=
1
:
size
(
options_
.
irf_shocks
,
1
)
irf_shocks_indx
(
i
)
=
find
(
strcmp
(
deblank
(
options_
.
irf_shocks
(
i
,:)),
cellstr
(
M_
.
exo_names
)));
end
irf_shocks_indx_unique
=
unique
(
irf_shocks_indx
);
if
options_
.
debug
&&
(
length
(
irf_shocks_indx_unique
)
~=
length
(
irf_shocks_indx
))
fprintf
(
'\nSTOCH_SIMUL: Warning: The IRFs for some shocks have been requested twice.\n'
)
fprintf
(
'STOCH_SIMUL: The redundant entries will be ignored.\n'
)
end
irf_shocks_indx
=
irf_shocks_indx_unique
;
end
Write
Preview
Markdown
is supported
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