Error in Matlab

Dear All,

I’m trying to simulate this simple deterministic model using dynare, but I keep getting this error message:

dynare model1

Configuring Dynare …
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[mex] Bytecode evaluation.
[mex] k-order perturbation solver.
[mex] k-order solution simulation.

Starting Dynare (version 4.1.0).
Starting preprocessing of the model file …
ERROR: model1.mod:31.7: character unrecognized by lexer

??? Error using ==> dynare at 126
DYNARE: preprocessing failed

Does any one know what is wrong in my model file?

Thanks a lot!

Best,
Audrey
model1.mod (1.32 KB)

Hi,

Mainly I noted the following syntax errors. You need to remove the symbol backslash that appears at each line of your mod-file. Each equation inside the block model should end by a semicolon. Try to check the definition of the variable k; basically it can’t be declared both as exogenous and endogenous variable.

Best

Hi,

Thanks a lot for your reply, I realized that my problem is with the TextEdit in Mac.
May I know which editor should I use if I try to create a mod file in mac?

Thanks a lot in advance.

Best,
Audrey

Hi

I’m not a Mac user, but a good choice is to use the internal editor of MATLAB, which you invoke by typing “edit” at the prompt.

Otherwise the best editor, but not the most user friendly, is GNU Emacs (there must be a Mac package around).

Best

Hi,

Thanks a lot! The built-in editor in Matlab is great, there is no backslashes in my mod file anymore.

Best,
Audrey