I am trying to estimate a Ramsey and i keep running into the error “Unable to perform assignment because the left and right sides have a different number of elements”. The model works fine with stoch_simul, but when i try the Ramsey policy it doesn’t. I have attached the steady state m file, the recursive solver file (I use fsolve) and and the _steadystate file.
I have trouble running your code. You are calling Ramsey.m in the steady state file. But that is the name of the mod-file which is not allowed and there is no other file with that name.
You have parameters like R_ss in your steady state file that are empty matrices. In the loop at the end, you are trying to assign those empty arrays to an entry in the vector. That cannot work.