From: Rupika Bandara on
Hi all,
I used y=awgn(x,SNR) function in MATLAB 2007 .
FOR X=100
SNR=-40
Answers are very different. After getting first answer, if I clear command window and type same values again, it gave different value than first answer. Can anyone explain it to me?
From: Heiko on
"Rupika Bandara" <rupika23(a)yahoo.com> wrote in message <hrgnsd$b2r$1(a)fred.mathworks.com>...
> Hi all,
> I used y=awgn(x,SNR) function in MATLAB 2007 .
> FOR X=100
> SNR=-40
> Answers are very different. After getting first answer, if I clear command window and type same values again, it gave different value than first answer. Can anyone explain it to me?

Hi,

the reason is that the uniform random numbers that are lying behind the calculation of random numbers in matlab will use a seed that depends on dynamic states (e.g. actual time). Therefore you will get a different seed for every initialisation and hence a different random number for every initialisation. As gaussian white noise is nothing else than random numbers with specified bias (=0) and variance, you will receive different numbers at each time step.

Regards,

Heiko
From: us on
"Rupika Bandara" <rupika23(a)yahoo.com> wrote in message <hrgnsd$b2r$1(a)fred.mathworks.com>...
> Hi all,
> I used y=awgn(x,SNR) function in MATLAB 2007 .
> FOR X=100
> SNR=-40
> Answers are very different. After getting first answer, if I clear command window and type same values again, it gave different value than first answer. Can anyone explain it to me?

you must be kidding(!)...
anyhow, great joke...

us