フィルターのクリア

is this matlab code of 8psk ??

5 ビュー (過去 30 日間)
mary
mary 2013 年 2 月 27 日
l=100000; %L length of si the input one dimension array
nni=randn(1,l);%generate L by L array of random scalare
si=randsrc(1,l,[+1,-1;.5,.5]);%generate 1 by L array of -1&+1
snr=[0:15];
for i=1:16
errorcounter=0;
stdn=sqrt(10^(-snr(i)/10))
ni=nni*stdn;% ni is 1 by L dimension
for m=1:l
ri(m)=ni(m)+si(m);
if ri(m)>0
sdi(m)=1;
elseif ri(m)<=0
sdi(m)=-1;
end
if sdi(m)~=si(m)
errorcounter=errorcounter+1;
end
end
ber(i)=errorcounter/l
end
semilogy(snr,ber,'r','LineWidth',2)
xlabel('snr db');ylabel('ber');grid;
  5 件のコメント
Rick Rosson
Rick Rosson 2013 年 3 月 2 日
  1. Please use proper indentation in your code.
  2. Please do not use lower-case l as a variable. It looks almost the same as the numeral 1 and is very confusing. Use upper-case L instead.
  3. Please add comments explaining what each variable represents.
Thanks.
mary
mary 2013 年 3 月 2 日
okay thanks for the notes

サインインしてコメントする。

採用された回答

Rick Rosson
Rick Rosson 2013 年 3 月 2 日
編集済み: Rick Rosson 2013 年 3 月 2 日
No. As far as I can tell, this code is BPSK, not 8PSK. Also, there are several mistakes in the code.
  4 件のコメント
mary
mary 2013 年 3 月 2 日
i just wanna understand how 8psk works .. an explination not matlab code .. but the code helps me to understand faster thats why i asked for a code ..
Walter Roberson
Walter Roberson 2013 年 3 月 2 日
File Exchange.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangePSK についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by