Adding data sequence to gaussian noise sequence

Status
Not open for further replies.

ryder

Newbie level 4
Joined
Jul 5, 2013
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
37
Adding data sequence to gaussian noise sequence in MATLAB

Hi,
received sequence,r=s+v
s=+-1 is the data sequence and v is a gaussian noise sequnce.
Decision ckt :if r>0 then 1
r<0 then 0

Now i have to estimate BEP for SNR of 0 to 10 in 1dB increment.

Should i use awgn function for the gaussian noise sequence? Please let me know how to do this.
 
Last edited:

you can use randn function for awgn noise
e.g. sqrt(variance)*(randn(1,1)-mean) is awgn noise.
 
Reactions: ryder

    ryder

    Points: 2
    Helpful Answer Positive Rating
you can use randn function for awgn noise
e.g. sqrt(variance)*(randn(1,1)-mean) is awgn noise.
thank you very much....
how can i generate the data sequence s=+-1? should i simply initialize an array like [1, -1,1,-1....]?
 

you can use randn function for awgn noise
e.g. sqrt(variance)*(randn(1,1)-mean) is awgn noise.
i have to generate gaussian noise with snr increment from 0 to 10dB, with step size of 1dB.
i'm using variance=10^(-snr/10); in noise=sqrt(variance)*randn(size(x));
now i want the snr to be in dB.......any code to convert snr in magnitude to snr in dB.
i found this on mathworks.com "ydb=mag2db" .but this is to convert a single value. In my case i want incrementing snr in dB
 

its your consideration, matlab doesnt know what is db and what is not db
you have to treat that variable like it is in db
 
Reactions: ryder

    ryder

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…