Macro-processor language and loops

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.

Macro-processor language and loops

Postby Niki » Wed Jul 06, 2016 2:15 pm

Dear all,

I am having a question concerning macro-processing language and loops in Dynare 4.4.3. I am using the macro-processing language to define new macro-processor variables, where I can have conditional statements on thereafter in the mod file. My question is whether I can have loops on the macro-processor variable values, outside of the mod file, in a separate m file. So for example, for different values of these macro-processor variables, run the dynare *.mod file.

Thank you for your help in advance.

Best,
Niki
Niki
 
Posts: 2
Joined: Wed Jul 06, 2016 1:52 pm

Re: Macro-processor language and loops

Postby jpfeifer » Thu Jul 07, 2016 8:55 am

No, that is not possible, but you can use Matlab variables outside of the mod-file and pass them to the mod-file to set preprocessor variables. That should to the trick. This can be done with the
Code: Select all
-D
switch in the command line. See http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=8083
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Macro-processor language and loops

Postby Niki » Tue Aug 02, 2016 11:58 am

Dear Johannes,

Thank you so much. It works perfectly.

Kind regards,
Niki
Niki
 
Posts: 2
Joined: Wed Jul 06, 2016 1:52 pm


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 9 guests