Commit 45ebd1b3 authored by Pablo Winant's avatar Pablo Winant Committed by Sébastien Villemot
Browse files

Compatibility fix for Octave. In dr1, line 384, if w1 is a scalar, condest(w1)...

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.
parent 92cb073f
......@@ -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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment