Numeric steady state solution in the model block

I have a model where an essential part of the steady state is solved numerically (rather than analytically) through Matlab’s fsolve command. fsolve is called from the steady state file.

Now, I wish to include a steady state term into the model block of my .mod-file. Normally, this can be accomplished through pound operators (i.e., #), but pound operators do not accept Matlab functions such as fsolve. Consequently, I am not able to derive the steady state with pound operations in the beginning of the model block.

Is there a way to include steady state terms into the model block of the .mod-file when the steady state is solved numerically through Matlab functions?

Yours sincerely,
Marcus Mølbak Ingholt
Ph.D. Candidate
University of Copenhagen

Use the

command inside of the model block. If the steady state can be computed numerically, this will work.

Thank you for your quick reply.

Does steady_state() also work during estimation when parameters, hence the steady state, is continuously updated by the computer? That is, does steady_state(y) update the steady state of y when the underlying parameters that determine y in steady state are changed, e.g., during an estimation?

Yes. If you make sure your steady states themselves are correctly updated, the steady_state()-operator will take this into account by substituting the recomputed steady state.

That is great. Once again, thank you.