skrf.network.innerconnect_s_lstsq
- skrf.network.innerconnect_s_lstsq(A, k, l)[source]
Connect two ports of a single n-port network’s s-matrix using a least-squares solution. It uses a least-squares approach to handle cases where the determinant of the sub-matrix is close to zero, which can lead to numerical instability in the direct formula.
Note
If the determinant of the sub-matrix is not close to zero, it is recommended to use the innerconnect_s function instead, which uses a direct formula for better numerical stability.
- Parameters:
A (
numpy.ndarray) – S-parameter matrix of A, shape is fxnxnk (int) – port index on A (port indices start from 0)
l (int) – port index on A
- Returns:
AEE – new S-parameter matrix
- Return type:
See also
connect_sactual S-parameter connection algorithm.
innerconnect_sactual S-parameter connection algorithm.