DYNARE launch error in MATLAB

Hi,

i had just installed DYNARE and I am trying to create my first .mod file.
I followed the instructions from dynare-manual (installation and adding path to the matlab), but when I tryed to create my first dynare file in Matlab, I recived this error message.

addpath c:\dynare\4.5.6\matlab
pwd

ans =

'C:\Matlab, R & Spol\Matlab\bin'

dynare myfile.mod

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).
[mex] Markov Switching SBVAR.

Using 64-bit preprocessor
Starting Dynare (version 4.5.6).
Starting preprocessing of the model file …
ERROR: myfile.mod: line 3, cols 1-0: syntax error, unexpected $end

Error using dynare (line 229)
DYNARE: preprocessing failed

Please, can somebody give me hint what to do?

could you please post the mod file?

I just tried to create .mod file (maybe, this is the problem? :slight_smile: ).

dynare myfile
is the correct syntax
not
dynare myfile.mod

I tried it, and Matlab gave me same error :-/

dynare myfile

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).
[mex] Markov Switching SBVAR.

Using 64-bit preprocessor
Starting Dynare (version 4.5.6).
Starting preprocessing of the model file …
ERROR: myfile.mod: line 3, cols 1-0: syntax error, unexpected $end

Error using dynare (line 229)
DYNARE: preprocessing failed

ERROR: myfile.mod: line 3, cols 1-0: syntax error, unexpected $end

you probably placed an end where it should not appear.

Sorry, for dumb questions, Im trying to launch dynare for first time. :slight_smile:

I did not make any interventions in the dynare script, and by dynare myfile command I wanted to create a new .mod file. Can this cause the problem?

Hi,

Two remarks:

First, the following commands are equivalent:

>> dynare myfile

or

>> dynare myfile.mod

or

>> dynare myfile.dyn

if your file has a dyn extension (only dyn or mod extensions are allowed).

Second, the dynare command does not create a new mod file as you seem to believe. You need to use a proper mod file. Dynare is distributed with a subfolder named examples. Can you run example1.mod? If yes can you post your mod file.

Best,
Stéphane.

You can create your first mod file by copying the contents of example1.mod into a matlab script and saving the script with a .mod extension. (Use save…all files)
Reuben

Now it works correctly! :slight_smile:
Thank you very much!

Thanks very much! ’
It works perfectly