I’m working through a baseline RBC model. All worked fine when I entered the exact s.s. into the model file, but when I created a separate _steadystate.m file the computation failed. I thought I augmented the steadystate.m examples provided here, but apparently I made a mistake. Can someone help me? I know that the calculations in the steadystate.m file should be correct, because matlab can calculate them separately.
I’m happy for any help.

Where did you get the wrong steady state file from? The structure should follow the one in the NK_baseline_steady_state.mod in the examples folder of Dynare. I corrected it. Moreover, your Euler equation was wrong (missing bracket after the stochastic discount factor; the undepreciated capital part must be discounted as well) as were the steady state equations. Attached is a hopefully correct version. rbc_baseline_steadystate.m (1.67 KB) rbc_baseline.mod (1003 Bytes)

Thanks a lot for your reply. It works perfectly.
I guess I tried a combination of a .m file I found online and lecture notes, obviously not in an appropriate way. Actually, I found out that one of my older attempts worked when I changed the steady state equations in the way you did. But I don’t really understand my mistake. Is the definition of r one plus the interest rate (r= 1+ interest rate)? If yes, why do I have to integrate them?
Thanks
LEM

Your first order condition was wrong. The stochastic discount factor also applies to the undepreciated part of capital. See any macro textbook on the RBC model.