Page 1 of 1

Function handle in .mod file

PostPosted: Thu May 02, 2013 2:09 pm
by jefbref
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.

Re: Function handle in .mod file

PostPosted: Sun May 05, 2013 9:52 am
by jpfeifer
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.

Re: Function handle in .mod file

PostPosted: Mon May 06, 2013 10:31 pm
by jefbref
Thanks you jpfeifer.