Advertisement
stiansjogren

Untitled

May 27th, 2016
305
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. %% Task 4
  2. %
  3. FFTSIZE = 512;
  4. Fs = 7.68e6 ; % Hz
  5. Fc = 859.6e6; % Carrier Frequency
  6.  
  7.  
  8.  
  9. pdp = mean(abs(ifft(H2,50)).^2,2);
  10. figure;
  11. plot(linspace(0,222e-9 * 50,50), 10*log10(pdp))
  12. title 'Power delay profile'
  13.  
  14.  
  15. Pm = sum(pdp); % total power
  16.  
  17.  
  18. tau = linspace(0,222e-9 * 50,50);
  19.  
  20.  
  21. tmp = 0;
  22.  
  23. Tm2= sum(tau*pdp)/Pm;
  24.  
  25. for i =1:length(pdp)
  26. tmp = tmp + pdp(i) *tau(i);
  27. end
  28. Tm = tmp/Pm; % Average mean delay
  29.  
  30.  
  31.  
  32. tmp2 = 0;
  33. for i =1:length(pdp)
  34. tmp2 = tmp2 + pdp(i)*power(tau(i),2);
  35. end
  36.  
  37. S = sqrt( tmp2/Pm - power(Tm,2)); % Average delay spread
  38.  
  39. fprintf('Average delay spread %e ns\n', S);
  40. fprintf('Average mean delay %e ns\n', Tm);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement