Skip to content
Snippets Groups Projects
Commit 10047fee authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Test if shocks are declared.

Fixes bug introduced in 97b894a1, if no shocks
are declared (for instance if the user is interested in the transition to the
steady state).
parent 97b894a1
Branches
Tags
No related merge requests found
......@@ -51,7 +51,7 @@ if options_.periods == 0
error('PERFECT_FORESIGHT_SETUP: number of periods for the simulation isn''t specified')
end
if options_.periods<max([M_.det_shocks.periods])
if ~isempty(M_.det_shocks) && options_.periods<max([M_.det_shocks.periods])
error('PERFECT_FORESIGHT_SETUP: number of periods for the simulation is specified to be smaller than the period of the last shock')
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment