- Format your code.
- Give a description of what it does and what is wrong
- State clearly what you need it to do.

**Info**

This question is closed. Reopen it to edit or answer.

# i want to plot the graph between the probability of false alarm and probability of detection

1 view (last 30 days)

Show older comments

clear; L=3; a=1; N=1000; Ns=3; f1=0.05; v=0.2985; %db2mag gi=1; gl=1; gj=1; w=0; sigm=0; for i=1:L sigma(i)=0.5*(gi)^2; sigm=sigm+sigma(i); end; for n=1:L rs(n)=sigm^2*(Ns-n)/Ns; pl(n)=rs(n); pc(n)=rs(n).*cos(2*pi*f1*n); end ps=0; for l=1:L p(l)=gl*pl(l)*cos(w*l); ps=ps+p(l); end

q=0; for i=1:L for j=1:L if j>i; break

q1(i,j)=0.5*gi*(pc(i-j)+pc(i+j))*gj;

q=q+q1(i,j);

end

end

end %p0=qfunc*(y.*(((y.^2)+sigma)/n).^(-0.5));

for e=1:1:10

y(e)=(qfuncinv(e)).*sqrt((0.5*a)./(N-((qfuncinv(e)).^2))); %lamda

z(e)=(((1+v)*y(e).^2)-(4*ps*v*y(e))+(sigma+q*v))/(N*(v+1)^2);

u1=ps*v/(v+1);

p1(e)=qfunc((y(e)-u1)/sqrt(z(e)^2*(y(e))));

end

plot(p0,p1,'b*'); grid;

##### 0 Comments

### Answers (1)

Matt Fig
on 15 Dec 2012

##### 2 Comments

Image Analyst
on 15 Dec 2012

Edited: Image Analyst
on 15 Dec 2012

### See Also

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!