Integral evaluation

Hi all,
I’m writing an RBC model with the financial accelerator. I need to solve for an upper limit of an integral in the model. I’m new to Dynare so I don’t know how. There are 2 integrals: integration of a log-normal pdf and integration of (w*log-normal pdf) between 0 and upper limit w_bar. Can I stick Dynare code in Matlab m-file?
Thanks alot.

In your model file, you can call a function that computes these integrals. It can be either a function that is part of Matlab or one for which you provide the *.m file.

As for your second question, it is rarely efficient to call Dynare from inside a *.m file. On the opposite, you can add Matlab code such as loops in your *.mod file

Kind regards