Compatibility fix for Octave. In dr1, line 384, if w1 is a scalar, condest(w1) raises an error in octave. It is equal to 1 in matlab.

time-shift
Pablo Winant 2010-09-21 14:10:18 +02:00 committed by Sébastien Villemot
parent 92cb073f3a
commit 45ebd1b3fb
1 changed files with 2 additions and 1 deletions

View File

@ -392,7 +392,8 @@ else % use original Dynare solver
% derivatives with respect to dynamic state variables
% forward variables
w1 =w(1:n3,n2:nd);
if condest(w1) > 1e9;
if ~isfloat(w1) && (condest(w1) > 1e9)
% condest() fails on a scalar under Octave
info(1) = 5;
info(2) = condest(w1);
return;