Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- close all
- T_S = 1/(7.68e6);
- omega_max = 300;
- nb_samples = 10e-3 * 7.68e6;
- rayChanObj = rayleighchan(T_S, omega_max, 0, 0) ;
- rayChanObj.StoreHistory = 1;
- x = ones(nb_samples,1);
- y = filter(rayChanObj,x);
- g = rayChanObj.PathGains;
- [acf_sos,lag_sos] = xcorr(sumofsinusoids((1/(7.68e6)), 20, 300,nb_samples));
- [acf_flt,lag_flt] = xcorr(y);
- % subplot(1,3,1)
- % plot(lag_sos,acf_sos/max(acf_sos));
- % subplot(1,3,2)
- % plot(lag_flt,acf_flt/max(acf_flt));
- % chlen = -0.01:T_S:0.01;
- % subplot(1,3,3)
- % plot(linspace(-76799,76799,length(besselj(0, 2*pi*300*chlen))),besselj(0, 2*pi*300*chlen));
- % Problem 2
- % Generate foure independent fading channels
- a = [0 0.3 0.9]; b = [0 0.9 0.9];
- G = zeros(2,2,nb_samples);
- tmp = sumofsinusoids((1/(7.68e6)), 20, 300,nb_samples);
- for k=1:2
- for j=1:2
- for i= 1:length(sumofsinusoids((1/(7.68e6)), 20, 300,nb_samples))
- G(k,j,i) = tmp(i);
- end
- tmp = sumofsinusoids((1/(7.68e6)), 20, 300,nb_samples);
- end
- end
- %Rtx= [1 a(j); conj(a(j)) 1] ; Rrx = [1 b(j); conj(b) 1];
- for j =1:1
- H = sqrtm(Rrx).*G.*transpose(sqrtm(Rtx));
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement