Newbie Issues: Error using dynare (Line 120)


complete newbie here. I just installed version 4.3 and am attempting to run the provided examples (for example, example1-1). I am not changing the mod file in any way, just running it as is. Each time, I get

Configuring Dynare …
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[mex] Local state space iteration (second order).
[mex] Bytecode evaluation.
[mex] k-order perturbation solver.
[mex] k-order solution simulation.
[mex] Quasi Monte-Carlo sequence (Sobol).

Starting Dynare (version 4.3.0).
Starting preprocessing of the model file …
Found 7 equation(s).
Evaluating expressions…done
Computing static model derivatives:

  • order 1
    Computing dynamic model derivatives:
  • order 1
    Processing outputs …done
    Preprocessing completed.
    Starting MATLAB/Octave computing.

Error using dynare (line 120)
Error: Unexpected MATLAB operator.

What am I doing wrong? I run Matlab version R2011B (

Thanks for the help.

Why is there a dash (-) in your filename? I think Matlab does not allow this. Please rename it.

Thanks for the reply,

the issue is not the dash. That is, if I rename the file without the dash, I get the same message.

In any event, I am simply running the example provided on the Dynare site. There are several such examples, and I get the same message for all of them.

What exactly do you type into the command window?


I simply type

dynare c:\econ\dynare\example\example11

The path c:\econ\dynare\example is where I have stored the examples on my computer and example11.mod is the example1-1.mod (renamed) provided while downloading dynare. I think the file is an example constructed by Fabrice Collard.

Thanks for your help.

There’s the problem. You have to set your working directory to c:\econ\dynare\example\ and then use