Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Zero mean Circularly Symmetric Gaussian

Subject: Zero mean Circularly Symmetric Gaussian

From: Kashif

Date: 23 Jun, 2010 15:43:06

Message: 1 of 2

Hi All,

How shall I Generate Rayleigh Channel (h) with a variance other than 1 using randn.
Kinldy also tell how can I verify it.

The problem I am facing is

N=10000;

********************************************************
h=rand(N,1)+j*randn (N,1)/sqrt(2)
% gives var(h)=~0.5 and mean (real(h))=~0.5)
********************************************************
h= sqrt(0.5)*rand(N,1) + j*sqrt(0.5)*randn (N,1)
% gives var(h)=~0.5 and mean (real(h))=~0.35)
********************************************************
h=rand(N,1)+j*randn (N,1)
% gives var(h)=~1 and mean (real(h))=~0.5)
********************************************************
if Z=X+Y, then
As per var(Z)=var(X)+var(Y). Why this formula is not working for above.

Secondly why mean is not zero.

Subject: Zero mean Circularly Symmetric Gaussian

From: Roger Stafford

Date: 23 Jun, 2010 20:08:02

Message: 2 of 2

"Kashif " <rajakashif@gmail.com> wrote in message <hvta2a$7g8$1@fred.mathworks.com>...
> Hi All,
>
> How shall I Generate Rayleigh Channel (h) with a variance other than 1 using randn.
> Kinldy also tell how can I verify it.
>
> The problem I am facing is
>
> N=10000;
>
> ********************************************************
> h=rand(N,1)+j*randn (N,1)/sqrt(2)
> % gives var(h)=~0.5 and mean (real(h))=~0.5)
> ********************************************************
> h= sqrt(0.5)*rand(N,1) + j*sqrt(0.5)*randn (N,1)
> % gives var(h)=~0.5 and mean (real(h))=~0.35)
> ********************************************************
> h=rand(N,1)+j*randn (N,1)
> % gives var(h)=~1 and mean (real(h))=~0.5)
> ********************************************************
> if Z=X+Y, then
> As per var(Z)=var(X)+var(Y). Why this formula is not working for above.
>
> Secondly why mean is not zero.
- - - - - - -
  Try

 r = sigma*(randn(N,1);
 h = r.*exp(j*2*pi*rand(N,1));

where sigma is the square root of the desired variance.

Roger Stafford

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us