"Index exceeds matrix dimensions" error

Hi,

I just started using dynare. I wrote a fairly simple dynamic investment model (attached). I can get Dynare to compute a steady state, but when I try to simulate the model, I get the “Index exceeds matrix dimensions” error. This is puzzling to me, given that the steady state simulation works. Any suggestions? The full error is below.
Thanks for your help!

Tatyana

Index exceeds matrix dimensions.

Error in ==> sim1 at 42
nyf = nnz(lead_lag_incidence(3,:)) ;

Error in ==> simul at 82
sim1 ;

Error in ==> steady_state at 91
simul(oo_.dr);

Error in ==> dynare at 132
evalin(‘base’,fname) ;
steady_state.mod (814 Bytes)

Hi,

when I run your mod-file I get a message informing you that Dynare can’t compute deterministic simulation for purely backward models (I use the latest version of Dynare -FI this message has been added recently)

Best

Weird. I just downloaded dynare today (4.1.2), so I’m not sure why I wouldn’t get that that message as well.

sorry I was talking about the unstable version of dynare

best

Your model is purely static: no forward and no backward variable. Dynare is not designed to solve such static systems. You can use a vanilla non-linear solver to do that.

Best,