jakes.m

来自「alamouti 空频分组码---在时变信道下SFBC-OFDM」· M 代码 · 共 30 行

M
30
字号
% modified by Alger 2006.May
function  [h] = jakes(Datalen,fm,fs)

% Datalen the length of the data
% fm      max doppler frequence
% fs      sampling frequence

% initialing
wm  = 2*pi*fm;                                  % maximun doppler shift
Ts = 1/fs;                                      % sampling time
t = 0:Ts:(Datalen-1)*Ts;                        % time array
%No = 28;                                        % number of sinu waves
No = 8;
N = (2*No+1) * 2;

% construct of sinu waves
belta = pi*(1:No)/No;                           % beta(n) = pi*n/No
w = wm * cos(2*pi*(1:No)/N);                    % Wn = Wm*cos(2*pi*n/N)
phase_init = rand(No+1,1)*2*pi;                 % initial phase;

temp = cos(w.'*t + repmat(phase_init(1:No),1,Datalen));
resin = 2*repmat(cos(belta).',1,Datalen).*temp;
resqu = 2*repmat(sin(belta).',1,Datalen).*temp;

temp = cos(wm*t+phase_init(No+1));
res2in = sum(resin) + sqrt(2) * temp;
res2qu = sum(resqu);

h = sqrt(2/N)*(res2in + sqrt(-1) * res2qu);
return;

⌨️ 快捷键说明

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