Function handle in .mod file

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.

Function handle in .mod file

Postby jefbref » Thu May 02, 2013 2:09 pm

I need to use the integral function of Matlab in my .mod file. Dynare does not recognize the function handle I use in the first argument. I tried to declare the function handle as an external function (as I did for the integral function), but Dynare still can not recognize it.

Is it possible to declare it or should I use a different strategy?

Another question, I am using the integral function because I have to use the expected value of a variable from 0 to a variable that represents the threshold of the expected value I am trying to estimate ( integral(x*density, 0, omegaBar), where omegaBar is a variable in my .mod file). I am having a lot of problems computing my steady state using this method, is there another way to get an approximation of this expected value I need?

Thank you in advance.
jefbref
 
Posts: 19
Joined: Fri Mar 15, 2013 11:55 am

Re: Function handle in .mod file

Postby jpfeifer » Sun May 05, 2013 9:52 am

Generally, use a steady state file. There, you can use every function you like. Within the mod-file, using the integral as an external function is problematic due to Dynare trying to take derivatives.
------------
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: Function handle in .mod file

Postby jefbref » Mon May 06, 2013 10:31 pm

Thanks you jpfeifer.
jefbref
 
Posts: 19
Joined: Fri Mar 15, 2013 11:55 am


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 7 guests