%% reciprok dämpare
S11 = 0;
S12 = 0.708;
S21 = 0.708;
S22 = 0;

ZL = 25;
ZS = 50;
Z0 = 50;

gammaL = (ZL - Z0)/(ZL + Z0)
gammaS = (ZS - Z0)/(ZS + Z0)

gammaIN = S11 + (S12*S21*gammaL)/(1-S22*gammaL)
gammaOUT = S22 + (S12*S21*gammaS)/(1-S11*gammaS)

G_P = (abs(S21)^2 * (1-abs(gammaL)^2))/((1-abs(gammaIN)^2)*abs(1-S22*gammaL)^2)
G_P_dB = 10*log10(G_P)

G_a = (abs(S21)^2 * (1-abs(gammaS)^2))/(abs(1-S11*gammaS)^2 * (1-abs(gammaOUT)^2))
G_a_dB = 10*log10(G_a)

G_T = (abs(S21)^2 * (1 - abs(gammaS)^2) * (1 - abs(gammaL)^2))/(abs(1 - gammaS*gammaIN)^2 * abs(1 - S22*gammaL)^2)
G_T_dB = 10*log10(G_T)

