Merge pull request #627 from JohannesPfeifer/master

Fix bug in evaluation of steady state file
time-shift
Sébastien Villemot 2014-03-04 15:24:10 +01:00
commit b3e69da93b
2 changed files with 6 additions and 1 deletions

View File

@ -99,6 +99,10 @@ function [ys,params,info] = evaluate_steady_state_file(ys_init,exo_ss,M,options)
info(2) = residuals'*residuals;
return
end
if any(isnan(residuals))
info(1) = 22;
return
end
elseif ~isempty(options.steadystate_partial)
ssvar = options.steadystate_partial.ssvar;
nov = length(ssvar);

View File

@ -136,7 +136,8 @@ end
if options_.periods > 0 && ~PI_PCL_solver
if options_.periods <= options_.drop
disp(['STOCH_SIMUL error: The horizon of simulation is shorter than the number of observations to be dropped'])
fprintf('\nSTOCH_SIMUL error: The horizon of simulation is shorter than the number of observations to be dropped.\n')
fprintf('STOCH_SIMUL error: Either increase options_.periods or decrease options_.drop.\n')
options_ =options_old;
return
end