simulation of a rayleigh block fading channel in matlab

Status
Not open for further replies.

akamouch

Newbie level 1
Joined
Aug 21, 2014
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
8
Hello Everyone ;

I'm trying to simulate a communication system using matlab
In my system the channel is assumed to be rayleigh block fading i.e the channel is static during the transmission of one block and vary from a block to another.

My code is as follows :


Code C - [expand]
1
2
channel = sqrt(0.5*channel_var)*(randn(1,1) + i*randn(1,1)) ;
Noise = sqrt(0.5*noise_spectral_density/2)*(randn(1,length(data)) + ... i*randn(1,length(data))) ;



have two questions :

is my code correct ?
for the noise should I use randn(1,1) or randn(1,length(data) (as the channel is considered block fading)

thanks for your help
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…