Hi everyone,

I’m writing my Master’s thesis wherein I try to to set up a DSGE model with search and matching frictions. Since my model contains non-linear equations with endogenous variables, I use Matlab’s fsolve to get the steady state values. My .mod file is running but I’m not content with it because I’d like to evaluate how the steady state values and the model dynamics react to changes in parameters. Therefore I want to incorporate my .m-file into the .mod file.

A steady state file is the solution but I have no idea how to transform my .m-file (“mysteady”) into a steady state file because I’m rather new to Matlab. I know that I have to use “function[ys,check]=NAME_OF_THE_MOD_FILE_steadystate(ys,…)”, where ys is a vector with the steady state values of my variables I want to use as initial values in Dynare, but I have problems to understand the examples presented in this forum because I don’t know how to use fsolve within the steady state file.

It would be really helpful if anyone has an idea how to solve my problem.

Here are my .m files and my .mod file. Note that “afa1” is a .m-file I employ in my .mod file to calculate an integral expression. The file “mysteady_sol” is used to solve the equation system presented in “mysteady”.

Thanks in advance!