generate_h.m
来自「mimo信道模型、信道容量、编码等多方面的MATLAB仿真。是个不错的学习mim」· M 代码 · 共 19 行
M
19 行
function H = generate_H(nTx, nRx, R, lH, type, PDP_linear)
% H = generate_H(nTx, nRX, R, lH, type)
%
% Generates a H matrix whose correlation properties fit the values
% in given in correlation matrix R. These values can be (complex)
% field correlation coefficients or (real positive) power
% correlation coefficients
if (type == 0) % complex correlation
C = sqrtm(R);%chol(R);
else % power correlation coefficient
C = sqrtm(R.^.5);
end;
H = zeros(nRx, nTx, lH);
for k = 1:lH
TildeA = (C*(randn(nTx*nRx,1)+i*randn(nRx*nTx,1)))./sqrt(2);
H(:,:,k) = reshape(TildeA, nRx, nTx);
end;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?