📄 gm_generate.m
字号:
function h= GM_generate%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GLOBAL PARAMETERS%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%fc=2e9; % carrier frequencyc0=3e8; % speed of lightv = 2; % m/s mobile speednu_max = v*fc/c0; % maximum Dopplerfs = 80/3.75*2; % sampling frequency in HzTrep = 1/fs; % duration between snapshotsTd = 12; % overall duration in secondsT = Td*fs; % overall duration in samplesalpha = [ -pi/2*ones(4*fs,1); ((1:4*fs)'-1-fs*2)/(2*fs)*pi/2; pi/2*ones(4*fs,1)]; %% angle between mobile and path #2alpha= [alpha(1); alpha; alpha(end)];dalpha = 3/180*pi; %% angular spread of both pathsLL = 100; % no. of subpaths for each path%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LSF averaging (uses TF-Box)%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%KK = 1; % number of channel realizationsL1=96; % window length #1L2=16; % window length #2%W=zeros(256,T+L2-1); % LSF initializationL=zeros(T,1,4,4);for k=1:KK; %k, h=zeros(T,1); aa1 = 4*randn; % mean strength of path #1 aa2 = 6*randn; % mean strength of path #2 aa1=0; aa2=0; a1 = filter([.1 .4 .4 .1],1,rand(LL,1)); % mean strength of subpaths for path #1 a2 = filter([.2 .3 .3 .2],1,rand(LL,1)); % mean strength of path #1 for i=1:LL, h = h + (aa1+a1(i))*exp(j*2*pi*cumsum( nu_max*cos(-alpha + pi/2 + dalpha*(2*rand-1) ) )/fs +j*2*pi*rand); % path #1, subpath #i h = h + (aa2+a2(i))*exp(j*2*pi*cumsum( nu_max*cos( alpha + dalpha*(2*rand-1) ) )/fs +j*2*pi*rand); % path #2, subpath #i end; % i%% W = W + wd(h,symmpad(hamming(L1),256),hamming(L2)); %% update LSF estimate% W = wd(h(224:735),symmpad(hamming(L1),256),hamming(L2)); %% mit einem h von 512 l鋘ge% W=W(:,8:519); %abschneiden auf die dimension 256:512% figure; tf_show(W); drawnow; end; % k%W=W/KK;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -