From A-parameters to Z-parameters
In matrix form, the formula is
Z=([1000]A+[0100])([0010]A+[000−1])−1
While for each element, we obtain
Z11Z12Z21Z22=A21A11=A21A11A22−A12A21=A211=A21A22
The formulas are obtained with the methods explained here.
The MATLAB implementation can be found in circuitconversions on Gitlab.
Definitions
[V1I1]=A[V2−I2] | [V1V2]=Z[I1I2] |