?? sn2sg.m
字號(hào):
% MATLAB function sn2sg.m deals with mismatching
% effects at the Q terminals of a multi-port network.
% Function sn2sg.m needs as its inputs the
% normalizing impedance matrix Z0 (denoted Z0,
% diagonal format!), the mismatched impedance
% matrix Z0T, and the original normalized S matrix, SN.
% After a few intermediate steps (equations (1.76) -
% 1.78)), it delivers the generalized S' matrix, SG.
% Hence, the elements of SG take into account the
% network's actual terminations, including all possible
% mismatching effects.
%
% The MATLAB function call is SG = sn2sg(Z0, Z0T, SN).
function [SG] = sn2sg(Z0, Z0T, SN)
Q = length(Z0);
U = diag(ones(length(Z0),1))
for k=1:Q
xi(k)=(Z0T(k,k)-Z0(k,k))/(Z0T(k,k)+Z0(k,k));
psi(k)=(1-conj(xi(k)))*sqrt(1-(abs(xi(k))^2))/abs(1-xi(k));
end
Xi = diag(xi)
Psi = diag(psi)
SG = inv(Psi)*(SN-conj(Xi))*inv(U-(Xi*SN))*conj(Psi);
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -