Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: What's problem with "Rayleighchan" ?
Date: Sat, 2 Jan 2010 17:26:04 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 20
Message-ID: <hhnvjc$ipj$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1262453164 19251 172.30.248.38 (2 Jan 2010 17:26:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 2 Jan 2010 17:26:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2063502
Xref: news.mathworks.com comp.soft-sys.matlab:595979

Hello everybody !
I want to simmulate a Rayleigh channel with BPSK signal with following code 
===============================
chan=rayleighchan(1/10000,100);
M=2;
tx=randint(nbit,1,M);
dpsksig=pskmod(tx,M);
fadedsig=filter(chan,dpsksig);
snr=0:1:20;
for n=1:length(snr)
    rxsig=awgn(fadedsig,snr(n));
    rx=pskdemod(rxsig,M);
    [nerrors,ber(n)]=biterr(tx(2:end),rx(2:end));
end
================================
 But BER [1*21] I get is terrible 
[0.472647264726473	0.477147714771477	0.465246524652465	0.465346534653465	0.470547054705471	0.463746374637464	0.462746274627463	0.458845884588459	0.461246124612461	0.461546154615462	0.460046004600460	0.457145714571457	0.454145414541454	0.453945394539454	0.453345334533453	0.456245624562456	0.452745274527453	0.452245224522452	0.454945494549455	0.454645464546455	0.454845484548455]
It is different with theorical BER.
Why there is that difference? Someone can help me?
Sorry for bad English.