Accelerating the pace of engineering and science

# gammain

Input reflection coefficient of 2-port network

## Syntax

coefficient = gammain(s_params,z0,zl)
coefficient = gammain(hs,zl)

## Description

coefficient = gammain(s_params,z0,zl) calculates the input reflection coefficient of a 2-port network. s_params is a complex 2-by-2-by-M array, representing M 2-port S-parameters. z0 is the reference impedance Z0; its default value is 50 ohms. zl is the load impedance Zl; its default value is also 50 ohms. coefficient is an M-element complex vector.

coefficient = gammain(hs,zl) calculates the input reflection coefficient of the 2-port network represented by the S-parameter object hs.

## Examples

Calculate the input reflection coefficients at each index of an S-parameter array:

```  ckt = read(rfckt.amplifier,'default.s2p');
s_params = ckt.NetworkData.Data;
z0 = ckt.NetworkData.Z0;
zl = 100;
coefficient = gammain(s_params,z0,zl);```

expand all

### Algorithms

gammain uses the formula

${\Gamma }_{in}={S}_{11}+\frac{\left({S}_{12}{S}_{21}\right){\Gamma }_{L}}{1-{S}_{22}{\Gamma }_{L}}$

where

${\Gamma }_{L}=\frac{{Z}_{l}-{Z}_{0}}{{Z}_{l}+{Z}_{0}}$