Skip to content
Snippets Groups Projects
Verified Commit d8440438 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

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

Ref. !2215
parents a31c7640 54c4e9df
No related branches found
No related tags found
1 merge request!2215plot_shock_decomposition.m: filter out case where data to plot is empty and...
Pipeline #9707 passed
...@@ -536,6 +536,11 @@ b = size(z,3); ...@@ -536,6 +536,11 @@ b = size(z,3);
if ~isempty(options_.plot_shock_decomp.plot_init_date) if ~isempty(options_.plot_shock_decomp.plot_init_date)
my_initial_date = max(initial_date,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); 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 end
if ~isempty(options_.plot_shock_decomp.plot_end_date) if ~isempty(options_.plot_shock_decomp.plot_end_date)
if options_.plot_shock_decomp.plot_end_date<=(max(initial_date:initial_date+b-1)) if options_.plot_shock_decomp.plot_end_date<=(max(initial_date:initial_date+b-1))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment