ex5_1.m

来自「matlab code from book"MIMO signals and s」· M 代码 · 共 26 行

M
26
字号
% Example 5-1: Computation of Time-varying Channel
% Transfer Matrix Wc 
clear all
K = 4; % Number of time samples (I/O observations)
N = 4; % Number of channel inputs
M = 4; % Number of channel outputs

X = [1 -2  2  5
     3  1  2  3
     7  4  3 -1
     2  3  5  2]% Input signal matrix
  
Y = [1  4  2  1
     8 -1  1  2
     9  3  8  4
     2  7 -3  5]% Output signal matrix  
       
[Q, R] = qr(X); % QR-factorize input matrix
Ux = Q % Orthonormal input basis 
Wx = Ux*X % Generalized Fourier coefficients of input
Wy = Ux*Y % Generalized Fourier coefficients of output
Wc_hat = pinv(Wx)*Wy % Channel Transfer Matrix 
Y_hat = X * Wc_hat % Determine estimate of output matrix  
Errornorm = norm(Y-Y_hat,'fro') % Calculate Frobenius
% norm of output signal error matrix

⌨️ 快捷键说明

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