Character unrecognized by lexer - external function


in my code I have a steady_state_model block in which I compute the steady state of some model parameters (which endogenously depend from other parameters).

It does not work because I am calling an external function using the “@” symbol

sigwstar = fzero(@(sigma) zetaspbfcn(zwstar,sigma,sprd)-zeta_spb,0.5);

I attach the est_aejmodel.mod code and the zetaspbfcn function. I tried to have a look at previous posts but could not figure out the solution.

Many thanks for any help

Fabioest_aejmodel.mod (10.4 KB)

zetaspbfcn.m (178 Bytes)

Hi fabiover,

The steady_state_model block must be fed with a complete solution. It does not allow for computations that call solvers directly within it. However, you can call solvers inside a steady-state file. An example is provided in NK_baseline_steadystate.m in the examples folder that comes with your Dynare distribution.
Alternatively, you can call a function inside the steady_state_model block and have a solver called inside that function. An example is provided in example3_steady_state_helper.m called in the steady_state_model block of example3.mod in the same examples folder.:slightly_smiling_face:

1 Like