From G-parameters to A-parameters
In matrix form, the formula is
A=([0100]G+[1000])([0010]G+[000−1])−1
While for each element, we obtain
A11A12A21A22=G211=G21G22=G21G11=G21G11G22−G12G21
The formulas are obtained with the methods explained here.
The MATLAB implementation can be found in circuitconversions on Gitlab.
Definitions
[I1V2]=G[V1I2] | [V1I1]=A[V2−I2] |