Page 1 of 1

Blanchard-Kahn, Matlab vs Octave

PostPosted: Sun Dec 06, 2009 5:38 pm
by rrien
Hello,

I am trying to run a version of the Gali model with dynare 4.0.4 and octave 3.2.3 under Mac OSX Snow Leopard. I am using the binary package kindly provided by Christophe Cahn.

While the code works fine under Windows with Matlab R2009A, it raises a Blanchard-Kahn condition error under octave/Mac.

It seems that the eigenvalues are not all the same.

From Matlab:
Code: Select all
EIGENVALUES:
         Modulus             Real        Imaginary

      1.502e-016      -1.502e-016                0
             0.4              0.4                0
             0.4              0.4                0
             0.4              0.4                0
             0.4              0.4                0
          0.7908           0.7908                0
           1.022             1.02          0.07026
           1.022             1.02         -0.07026


From octave:
Code: Select all
EIGENVALUES:
         Modulus             Real        Imaginary

       2.471e-16        2.471e-16                0
             0.4              0.4                0
             0.4              0.4                0
             0.4              0.4                0
             0.4              0.4                0
          0.7908           0.7908                0
          0.8405           0.8405                0
           1.199            1.199                0


Does anyone know how I could solve this issue? I would really prefer to use octave if I have the choice. Many thanks!

Re: Blanchard-Kahn, Matlab vs Octave

PostPosted: Mon Dec 07, 2009 11:38 am
by SébastienVillemot
Hi,

In this example, MATLAB is giving the right answer, and Octave a wrong answer.

I found the reason: it is due to the fact that your Dynare installation doesn't contain the MEX files for Octave. And without them, Octave returns wrong eigenvalues (in future releases, Dynare will fail in that case, to avoid misleading people).

So you can use Dynare 4.0.4 with Octave, but you need to compile MEX files. See: http://www.dynare.org/DynareWiki/BuildingDlls

Best,

Re: Blanchard-Kahn, Matlab vs Octave

PostPosted: Mon Dec 07, 2009 3:15 pm
by rrien
Hello,

Thanks a million, it works just fine now!

I just followed the instructions to build the DLLs with build_octave.m.

Best,

Re: Blanchard-Kahn, Matlab vs Octave

PostPosted: Fri Jan 16, 2015 4:44 pm
by ecastro
Hello,
I'm facing the same problem but with new versions of dynare (4.4.3) and Octave (3.8.2): running the same .mod file with Matlab and Octave, the steady state is identical but the eigenvalues are different (and the rank condition holds on matlab but fails on Octave). Would you know how to solve the problem so that Octave gets the right eigennvalues?
Thanks.

Re: Blanchard-Kahn, Matlab vs Octave

PostPosted: Fri Jan 16, 2015 7:33 pm
by jpfeifer
I would need to see the mod-file.