📄 mimo2pi.m
字号:
% Algorithm "mimo2pi.m"
% Implementation of Node Reduction Algorithm
% and calculation of equivalent pi-shaped
% two-port network.
% Input Parameters:
% - Number of internal and exterior nodes: P
% - Admittances connecting nodes
P = 1;
while P < 2;
P = input('Number of Nodes P = ');
if P < 2
disp('Specify more nodes!')
end;
end;
% Input of admittances connecting nodes
disp('Make sure off-diagonal elements have negative sign')
disp(' ')
for k=1:P;
for n=k:P;
if k==n;
disp('Admittance of'), disp(n), disp('th node');
Y(k,n)=input('Y(k, n) = ');
else
disp('Admittances connecting nodes'),disp(k),disp(n);
Y(k,n)=input('Y(k, n) = ');
Y(n,k)=Y(k,n);
end;
end;
end;
% ===============
Yr=Y;
% Calculation of reduced admittance matrix, Yr
for k=1:P-2;
Yr=Yr(1:P-k,1:P-k)-Yr(1:P-k,P+1-k)*Yr(P+1-k,1:P-k)/Yr(P+1-k,P+1-k);
end;
% ===============
disp(' ')
disp('Original Admittance Matrix:'),Y
% disp('Reduced Admittance Matrix:'),Yr
y2=-Yr(1,2); y1=Yr(1,1)-y2; y3=Yr(2,2)-y2;
% ==================
disp(' ');
disp('Admittances of equivalent two-port Pi-circuit.')
y1, y2, y3
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -