Dynare++ v. 1.3.1

I am testing Dynare++ v. 1.3.1. There is clearly something I don’t understand about the new user interface (I have used version 1.1 in the past). What I did was the following.

  1. In the command prompt
  1. In Matlab

shocks=randn(3,20000); r = dynare_simul('juha50.mat',shocks);

The result was

The contents of ystart are

What am I doing wrong?

Thank you very much,


Dear Juha,

it works for me. The most likely reason why it doesn’t work for you is that your namespace in Matlab contains a symbol ystart declared as global and it collides with a local symbol ystart in dynare_simul.m. The solution is to clear your namespace and do not declare any symbols as global any more. Or, ystart might be an M_file? I don’t know. Check your Matlab environment with commands ‘who’ and with ‘which ystart’.

Let me know if it still doesn’t work.

One additional comment: The commands

shocks=randn(3,20000); r = dynare_simul('juha50.mat',shocks);

will result in exploding r, since randn generates shocks with stderr=1. Your shocks in the model are much smaller. If you want to use the same distribution (if you do not want to fool agents), then you should run:

load('juha50.mat'); shocks=chol(dyn_vcov_exo)*randn(3,20000); r = dynare_simul('juha50.mat',shocks);


Ondra K.

Dear Ondra,

Thanks for the reply. However, I don’t have a global variable called ystart:

[code]>> who

Your variables are:

dyn_g_1 dyn_i_e2 dyn_i_pnum dyn_nforw dyn_vars
dyn_g_2 dyn_i_e3 dyn_i_r dyn_npred dyn_vcov
dyn_g_3 dyn_i_f dyn_i_rn dyn_nstat dyn_vcov_exo
dyn_i_Pi dyn_i_m dyn_i_w dyn_shocks shocks
dyn_i_a dyn_i_muc dyn_i_y dyn_ss
dyn_i_d dyn_i_n dyn_mean dyn_state_vars
dyn_i_e1 dyn_i_pdenom dyn_nboth dyn_steady_states

which ystart
’ystart’ not found.[/code]

ystart has value only inside the dynare_simul.m. And that value is really strange, “Empty state-space model.” Do you use that string anywhere in Dynare++ code?

Here’s my Matlab information:

MATLAB Version (R2006a)
MATLAB License Number: 257586
Operating System: Microsoft Windows XP Version 5.1 (Build 2600: Service Pack 1)
Java VM Version: Java 1.5.0 with Sun Microsystems Inc. Java HotSpot™ Client VM mixed mode

MATLAB Version 7.2 (R2006a)
Control System Toolbox Version 7.0 (R2006a)
Optimization Toolbox Version 3.0.4 (R2006a)
Statistics Toolbox Version 5.2 (R2006a)
Symbolic Math Toolbox Version 3.1.4 (R2006a)




I tried two versions of Matlab: (R14) SP3 on Windows (R14) SP2 on Linux
Everything works for me.

I know where might be the problem. The Control System Toolbox defines a method ss, which creates empty state space if no parameters are provided. This is what probably happens at line 127 of dynare_simul.m. However, at the line 115, ss variable is set to the decision rule’s fix point. For some reason, in your case, the line 115 fails to create the vector ss and override the definition of ss from the toolbox. It works for me even when ss is defined.

So, first try to replace line 115 with

For me, the both versions work even if ss is defined as M_file.

Second, unlink the toolbox.

Let me know if it helps.


Ondra K.

Hi Ondra,

Thank you! After changing the line 115, it works!




this is both good news and bad news. Good news is that we know how to fix it. Bad news is that the behaviour of eval in Matlab is strange and apparently its semantics changed from version 7.1 to 7.2.

Nevertheless, I will rewrite all eval commands and commit the new version. Until 1.3.2 is released, the new dynare_simul.m can be downloaded from svn snapshots.


Ondra K.