Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: cognitive radio
Replies: 47   Last Post: Dec 5, 2012 1:46 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
amit

Posts: 2
Registered: 11/21/12
Re: cognitive radio
Posted: Nov 21, 2012 10:05 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

hi, im also stuck on my matlab code for cognitive radio, it doesnt seem to work. i need graphs for pf vs pd and then introduce noise later on. my code so far is:
Could really do with some help and pointers. thanks!
amit703@hotmail.com

%monte carlo simulation
function [y1,y2,y3,y4]= ed(SNRL,SNRS,SNRH,n) %ed is the energy detection
g1= SNRL:SNRS:SNRH;
g=10.^(g1/10);
beta=0.01; % is the probability of flase alarm

pf1=zeros(1,length(g));
pd1=zeros(1,length(g));
pf2=zeros(1,length(g));
pd2=zeros(1,length(g));

for i=1 : length(g)
y0 = randn(n,1000000);
y1= randn(n,1000000)*sqrt(g(i))+y0;


Tgam = gaminv(1-beta,n/2,2/n*(1+g(i))); %threshold
pf1(i)= gamcdf(Tgam,n/2,2/n*(1+g(i)))
pd1 (i) = gamcdf(Tgam,n/2,2/n); % prob of detection
pf2(i)= length (find(sum(y1.^2)/n<Tgam))/1000000;
pd2 (i) = length (find(sum(y0.^2)/n<Tgam))/1000000;

end
y1=pf1; y2=pd1; y3=pf2; y4=pd2;


Date Subject Author
8/8/08
Read cognitive radio
nancy
8/19/08
Read Re: cognitive radio
Guido Gioberto
8/21/08
Read Re: cognitive radio
nancy
9/5/08
Read Re: cognitive radio
nancy
10/15/08
Read Re: cognitive radio
rizwan
10/27/09
Read Re: cognitive radio
Johnas
12/7/09
Read Re: cognitive radio
Luca
1/16/10
Read Re: cognitive radio
Md. Rakib
3/7/10
Read Re: cognitive radio
khalil ajmi
2/10/11
Read cognitive radio
amber
5/8/10
Read Re: cognitive radio
sesham srinu
10/20/08
Read Re: cognitive radio
chen ximei
10/20/08
Read Re: cognitive radio
chen ximei
1/11/09
Read Re: cognitive radio
gmt mathew
9/8/09
Read Re: cognitive radio
Brice
1/22/12
Read Re: cognitive radio
vengat
3/12/12
Read Re: cognitive radio
gopinath R
3/8/10
Read Re: cognitive radio
Jorian
2/12/09
Read Re: cognitive radio
Mirage Bhatti
5/8/10
Read Re: cognitive radio
sesham srinu
2/13/09
Read cognitive radio
sapna sharad
6/2/10
Read Re: cognitive radio
samee Rehman
2/23/09
Read Re: cognitive radio
Soyoung LEe
2/23/09
Read Re: cognitive radio
talhazahir@gmail.com
4/6/09
Read Re: cognitive radio
mary
7/15/09
Read Re: cognitive radio
kk muthu
7/15/09
Read Re: cognitive radio
Alicia Cheng
10/22/09
Read Re: cognitive radio
ehab elshaer
5/3/10
Read Re: cognitive radio
Vivi Sera
5/3/10
Read Re: cognitive radio
Vivi Sera
5/8/10
Read Re: cognitive radio
sesham srinu
1/7/12
Read Re: cognitive radio
vengat
1/7/12
Read Re: cognitive radio
vengat
1/8/12
Read Re: cognitive radio
mobien
11/24/12
Read Re: cognitive radio
jenkinwinston.j2011@vit.ac.in
7/16/10
Read Re: cognitive radio
her linda
7/16/10
Read Re: cognitive radio
Steven Lord
10/8/10
Read Re: cognitive radio
mike mekkanen
11/14/10
Read Re: cognitive radio
shamser
11/14/10
Read Re: cognitive radio
shamser
11/14/10
Read Re: cognitive radio
shamser
11/14/10
Read Re: cognitive radio
shamser
11/25/10
Read Re: cognitive radio
ravi sharan
11/25/10
Read Re: cognitive radio
Walter Roberson
5/25/11
Read Re: cognitive radio
Sindiso Nleya
9/8/12
Read Re: cognitive radio
jaya pavi
11/21/12
Read Re: cognitive radio
amit
12/5/12
Read Re: cognitive radio
ABDUL

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.