How to save the Jacobian matrix of the last Newton iteration?

How to save the final iteration of the Jacobian matrix A (or full(A)) in the file sim1.m?

There is no default way of doing this. But you can manually add a save command in sim1 like

if converged
save('sim1_debug',A)
....

Thanks a lot. But new Dynare’s versions don’t allow for edditing sim1. I will try to do this with older versions.

(post deleted by author)