Error in lnsrch1

Has anyone seen this error message when running a Dynare deterministic simulation?

I do not understand which matrix dimensions do not agree. The number of equations is equal to the number of variables. The initval and endval block contain a value for all endogenous and exogenous variables.

Thank you!

Error using /
Matrix dimensions must agree.
Error in lnsrch1 (line 82)
alamin = tolx/test ;
Error in solve1 (line 107)
Error in dynare_solve (line 150)
[x,info]=solve1(func,x,j1(r(i):r(i+1)-1),j2(r(i):r(i+1)-1),jacobian_flag, …
Error in evaluate_steady_state (line 66)
[ys,check] = dynare_solve([M.fname 'static’],…
Error in steady
(line 54)
[steady_state,params,info] =
Error in steady (line 81)
[steady_state,M_.params,info] = steady_(M_,options_,oo_);
Error in SAdet (line 641)
Error in dynare (line 180)
evalin(‘base’,fname) ;

Please provide an example.

This was the same code as in my other post. I could not give an example as I did not understand the error message at all. Anyway, the problem does not exist anymore as I explained in my other post. Thank you anyway!