Page 1 of 1

Error in Matlab

PostPosted: Sun Mar 07, 2010 4:43 pm
by audrey
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

Re: Error in Matlab

PostPosted: Sun Mar 07, 2010 6:03 pm
by AssiaEzzeroug
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

Re: Error in Matlab

PostPosted: Tue Mar 09, 2010 12:09 pm
by audrey
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

Re: Error in Matlab

PostPosted: Wed Mar 10, 2010 9:53 am
by SébastienVillemot
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

Re: Error in Matlab

PostPosted: Mon Mar 15, 2010 1:59 pm
by audrey
Hi,

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

Best,
Audrey