This question is closed.

Asked by ahmed
on 15 Dec 2012

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;

Answer by Matt Fig
on 15 Dec 2012

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

ahmed
on 15 Dec 2012

Image Analyst
on 15 Dec 2012

Opportunities for recent engineering grads.

Apply Today
## 0 Comments