Reset order=1 for all of stoch_simul.m if the Hessian is 0

Prevents various crashes where functions called rely on fields existing at order>1
time-shift
Johannes Pfeifer 2017-08-29 10:54:53 +02:00 committed by Stéphane Adjemian (Scylla)
parent 666e569a27
commit 0f84dadb9a
1 changed files with 5 additions and 0 deletions

View File

@ -36,6 +36,11 @@ if options_.order == 1
options_.replic = 1;
end
if M_.hessian_eq_zero && options_.order~=1
options_.order = 1;
warning('stoch_simul: using order = 1 because Hessian is equal to zero');
end
if isempty(options_.qz_criterium)
options_.qz_criterium = 1+1e-6;
end