Matrices of linear approximation

A linear approximation of a DSGE model generally has the following form:

E_t[Ax(t+1) + Bx(t) + Cx(t-1) + Du(t)] = 0,

where x(t) and u(t) are respectively the endogenous and exogenous variables in the ‘Dynare’ sense. Presumably, Dynare obtains the matrices A, B, C and D in the process of solving the linear decision rules (ghx, ghu). Could you please indicate where exactly Dynare computes these matrices, so that I can retrieve them? Also, does Dynare save these matrices somewhere?
Thanks a lot in advance,

You can find the algorithm Dynare uses here

The corresponding function where those computations are performed is stochastic_solvers.m

Maybe you can find there what you need. Dynare does not solve any of the intermediate matrices, but only the solution.