Same code different versions

I am able to run my program in version 3 when the order is 1. When I try to set order = 2, I get the following error:

??? Invalid MEX-file ‘C:…\dynare_v3\matlab\gensylv.dll’: The specified procedure could not be found.

Error in ==> dr1 at 443
ghxx = gensylv(2,A,B,C,D);

Error in ==> resol at 56
[dr,info] = dr1(dr,check_flag);

Error in ==> stoch_simul at 47
[dr_, info] = resol(ys_,0);

Error in ==> mymodel at 118

Error in ==> dynare at 26
evalin(‘base’,fname) ;

When I switched to Version 4, I cannot run the same program (code attached). Where am I going wrong?

mymodel.mod (891 Bytes)

Dear Maddy,

For dynare version 3, I don’t know your platform and your version of matlab but the problem may be that your gensylv dll is outdated (I had this problem recently)… Remove this dll and replace it by the file gensylv.dll or gensylv.mexw32 distributed with dynare version 4 (4.0.3)

For dynare verion 4, I can’t find the steady state… Even if I initialize with the one found with dynare version 3 (actually the steady state given by dynare_v3 is not very good, the residuals of the static equations are not exactly zero). Don’t you have an analytical expression for the steady state?


Thanks, I was able to solve the problem of order =2 by copying the file from Version 4.
I face the same problem of not finding the steady state in Version 4. I have the ratio of steady state variables analytically - I don’t know how to use this to find the right steady state values.


If you are able to obtain epression for steady state ratios it means that you can concentrate the problem. For instance, if you can express the ratio of Y and K as a function of deep parameters, say f(\theta), then you can replace Y by K*f(\theta). You can do this in the steadystate file associated to your mod file, and call a newton-like algorithm for the remaining variables.


Thanks again for your message! I was hoping to find an example of writing the steady state in the dynare user guide, but it is to be added shortly. Could you give me an example of how I can call the steady state? These are the ss ratios for my model.

m = (((1/ALPHA)(1/BETA-1+DELTA))^(1/1-ALPHA))k
c = ((1/ALPHA)

You’ll find an example on the forum here.

Best, Stéphane.