%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%% to include in your Matlab source                             %%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Generating the channel impulse response of a time-varying
%% channel according to a Jake's doppler channel model
%% Channel is the Hiperlan/2 channel model to use (1=A,2=B,3=C,5=E)
%% v is the terminal speed (m/s) with carrier frequency 5.2GHz
%%
%% October 2000. Bertrand Muquet, Sebastien Simoens, Shengli Zhou
%%
[variances,Lc]=CIRpowers(Channel);
hfr=[];
for ih=1:Lc+1
  hfr=[hfr;genh(FrameLength,v)];
end
hfr=diag(variances.^0.5)*hfr;
%% hfr is a size (Lc+1)x(FrameLength)
%% hfr(:,i) contains the CIR corresponding to the transmission of symbol i

