channel.m

来自「完整的OFDM仿真平台」· M 代码 · 共 23 行

M
23
字号
function y = channel(sig2, Mt, Mr, x, H, N);% function y = channel(sig2, Mt, Mr, x, H, N)%% Channel transmission simulator%% inputs:%   sig2 - noise variance%   Mt - number of Tx antennas%   Mr - number of Rx antennas%   x - vector of complex input symbols (for MIMO, this is a matrix, where each column%       is the value of the antenna outputs at a single time instance)%   H - frequency selective channel - represented in block-Toeplitz form for MIMO transmission%   N - number of symbols transmitted in OFDM frame%% outputs:%   y - vector of channel outputs (matrix for MIMO again, just like x matrix)% create noise vector sequence (each row is a different antenna, each column is a% different time index)  note: noise is spatially and temporally whitenoise = sqrt(sig2)*1/sqrt(2)*(randn(Mt*N,1) + j*randn(Mt*N,1));y = H*x + noise;

⌨️ 快捷键说明

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