Extracting Jacobian from Dynare

Dear Prof. Pfeifer,
For the new Dynare versions, how can I extract the Jacobian after runing a model? I use the Jacobian in my own code for regime-switching simulations. The command I used before the release is not working:
[~, g1] =feval(strcat(model,’_dynamic’), steady_state_values, x, param_values, SS, 1)
It seems that now the Jacobian matrix g1 is stored in a subfolder named +model_name. What would be the comand to obtain it automatically for model_1, model_2, etc? In case you need more information, please ask me. My regime switching code, together with the working paper number 526, is available at: Banco Central do Brasil
Many thanks

Usually, it should be strcat(model,'.dynamic')

It was embarrassingly simple to solve the problem. I spent hours yesterday trying before I sent the message on this Forum. Many thanks.

If you also require Jacobians of higher order, have a look at lines 558 and following in

Particularly, if you require orders higher than 3 one has to recover the Jacobians a bit differently.

Excellent. Ill need only the first order perturbation Jacobian, but it is good to know where to find output in Dynare. Many thanks.