Could this be a bug?

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Could this be a bug?

Postby olayenidynare » Thu Apr 30, 2009 8:57 am

Dear all,
While trying to simulate the attached file the following error message pops up. What could be wrong? Does it means Matlab files cannot be called from within DYNARE? The error seems to point to quad.m in Matlab. Please help me

Configuring Dynare ...
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.

Starting Dynare ...
Starting preprocessing of the model file ...
ERROR: KrauseLubik.mod:31.10: character unrecognized by lexer

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

Thanks
Attachments
KrauseLubik.mod
(4.44 KiB) Downloaded 482 times
olayenidynare
 
Posts: 22
Joined: Sat Feb 21, 2009 3:17 pm

Re: Could this be a bug?

Postby StephaneAdjemian » Thu May 14, 2009 9:37 am

Hi,

The problem is caused by the use of the symbol @ in a dynare statement (where the parameter Hauc is defined). This is Ok with dynare version 3 but not with dynare version 4, where this symbol is used for the macroprocessor (see here). You are only allowed to use @ in a non dynare statement, that is a line beginning by anything except a declared parameter, a declared variable or a dynare keyword. For dynare v4 the workaround is to replace the Hauc line by

Code: Select all
function_handle = @afa ;
Hauc = quad(function_handle,at,8);


The first line is not a dynare statement so you can use the @ symbol. Obviously you need the afa.m.

You should also look at this post.

Best, Stéphane.
Stéphane Adjemian
Université du Maine, GAINS and DynareTeam
https://stepan.adjemian.eu
StephaneAdjemian
 
Posts: 429
Joined: Wed Jan 05, 2005 4:24 pm
Location: Paris, France.


Return to Dynare contributions and examples

Who is online

Users browsing this forum: No registered users and 5 guests