State variables indices gone missing

I switched from MATlab to Octave (using version 4.3.1) and am no longer able to find the structure M_.state_var. I need these indices. Does anyone know where to find them in Octave?

Could it be that you switched to a newer Dynare version where it’s stored in

oo_.dr.state_var?

That does not exist either.

octave:6> oo_.dr.state_var
error: structure has no member ‘state_var’

Is there a reason you are not using the most recent unstable version of Dynare with Octave 4.2.1?

I’m using Dynare 4.3.1 and Octave 3.6.4 because I have legacy code from 2014 that parses out individual model variables and decision rules for a model with > 100 state variables. The code was previously working fine with Dynare 4.3.1 and MATlab 2015a (I lost my MATlab license). I installed Dynare 4.3.1 since I didn’t want to go through the ordeal of finding and labeling all the variables again. I believe the indexing of state variables changed in subsequent versions of Dynare. Would switching to Octave 3.8.1 help?

You must be confusing something. I looked into Dynare 4.3.1 and

seems to be only created with the

option. Thus, Octave is not the problem.
In 4.3.1, the state ordering should be in

I see. Thanks. My prior code was creating the transition matrix, hx, so that the state variables would be in declaration order.

hx=oo_.dr.ghx(oo_.dr.inv_order_var(M_.state_var),oo_.dr.inv_order_var(M_.state_var-20));

I’ve tried switching to:

hx=oo_.dr.ghx(oo_.dr.inv_order_var(oo_.dr.kstate),oo_.dr.inv_order_var(oo_.dr.kstate-20));

Basically, I’m trying to get the rows and columns of hx so that they are in declaration order. Would that already be the case with the new indexing?

I am not sure I understand what you mean with “new indexing”. To me it seems you were using a newer version already. Please note that in newer versions the ordering should be documented in the manual. You may also be interested in the discussion at [State space representation in Dynare)