⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 s1s2sc.m

📁 MIMO Signals And Systems一书的Matlab程序。
💻 M
字号:
% MATLAB function s1s2sc.m calculates the
% joint S matrix, SC, of two cascaded networks
% whose scattering matrices are denoted by S1 and S2,
% respectively.
% Since the first network, NET1, has N inputs
% and M output ports, S1 is a square (N+M)-by-(N+M)
% matrix.
% The second network, NET2, has to have M inputs
% connected to the M output ports of NET1.
% NET2 has P output ports. Its scattering matrix, S2,
% has a square (M+P)-by-(M+P) format.
% The function is invoked by typing the following
% command line:  SC = s1s2sc(S1,S2).
% The user will be asked to specify the number, M,
% of ports by which NET1 is connected to NET2. 

function [SC] = s1s2sc(S1,S2)

M = input('Enter number of output ports of NET1. M = ');

N = length(S1) - M;
P = length(S2) - M;


% Sub-matrices of NET1's scattering matrix, S1 
S11 = S1(1:N,1:N); 
S12 = S1(1:N,N+1:N+M); 
S13 = S1(N+1:N+M,1:N); 
S14 = S1(N+1:N+M,N+1:N+M); 

% Sub-matrices of NET2's scattering matrix, S2 
S21 = S2(1:M,1:M); 
S22 = S2(1:M,M+1:M+P); 
S23 = S2(M+1:M+P,1:M); 
S24 = S2(M+1:M+P,M+1:M+P);

U = diag(ones(M,1));

SC1 = S11 + (S12*inv(U-(S21*S14))*S21*S13);
SC2 = S12*inv(U-(S21*S14))*S22;
SC3 = S23*inv(U-(S14*S21))*S13;
SC4 = S24 + (S23*inv(U-(S14*S21))*S14*S22);

SC = [SC1 SC2; SC3 SC4];





⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -