-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkg_all.m
67 lines (38 loc) · 1.08 KB
/
kg_all.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
k=10
m=10
e2=k*m/200
gammabar2=[10:50:2000]
gamma1=100
z=e2*gamma1./gammabar2
a=[1]
b=[]
c=[k,m]
d=[0]
mg=meijerG(a,b,c,d,z)
gammak=gamma(k)
gammam=gamma(m)
F=mg/(gamma(k)*gammam)
gammabar3=10*log10(gammabar2)
semilogy(gammabar3,F.^1,'k--','LineWidth',1.3,'MarkerFaceColor','auto');grid on;hold on;
hold on
semilogy(gammabar3,F.^2,'g--','LineWidth',1.3,'MarkerFaceColor','auto');grid on;hold on;
xlabel("Gamma bar (dB)")
ylabel("Outage Probability")
e2=k*m/200
e=sqrt(e2)
gamma1=100
p1=4*(e^(k+m))
gammak=gamma(k)
gammam=gamma(m)
p2=p1/(gammak*gammam*(k+m))
gammadiv=gamma1./gammabar2
gammadivpow=gammadiv.^((k+m)/2)
F=p2*gammadivpow
gammabar3=10*log10(gammabar2)
semilogy(gammabar3,F.^1,'r--','LineWidth',1.3,'MarkerFaceColor','auto');grid on;hold on;
hold on
semilogy(gammabar3,F.^2,'b--','LineWidth',1.3,'MarkerFaceColor','auto');grid on;hold on;
legend("L=1 exact","L=2 exact","L=1 asymptotic","L=2 asymptotic");
xlabel("Gamma bar (dB)")
ylabel("Outage Probability")
title("Exact & Asymptotic Analysis KG");