Merge branch 'plot_shock_decomposition' of git.dynare.org:JohannesPfeifer/dynare

Ref. !2215
new-samplers
Sébastien Villemot 2023-12-08 15:49:19 +01:00
commit d844043877
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
1 changed files with 5 additions and 0 deletions

View File

@ -536,6 +536,11 @@ b = size(z,3);
if ~isempty(options_.plot_shock_decomp.plot_init_date)
my_initial_date = max(initial_date,options_.plot_shock_decomp.plot_init_date);
a = find((initial_date:initial_date+b-1)==options_.plot_shock_decomp.plot_init_date);
if isempty(a)
warning(['You set plot_init_date larger than the last observation. The last observation is %s,\n' ...
'while you requested as the first observation %s.Exiting because there is nothing to do.'],initial_date+b,options_.plot_shock_decomp.plot_init_date);
return;
end
end
if ~isempty(options_.plot_shock_decomp.plot_end_date)
if options_.plot_shock_decomp.plot_end_date<=(max(initial_date:initial_date+b-1))