Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] White Gaussian Noise Generator on MATLAB

Status
Not open for further replies.

rayyanc

Newbie level 2
Joined
Feb 4, 2012
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,304
Hey there,
I'm already aware of the in-built MATLAB functions for generating random numbers and noise (randn, rand, awgn etc.) It may be an easy solution but I guess I'm unable to see it clearly, so I thought I'd ask for some help here

My task is to create a software model of an LDPC Decoder, Encoder and the sort. While all that is completed the thing that I'm having a bit of trouble with is my Channel Coding. I basically have a row vector which is my encoded message, so it's just 1's and 0's. To that I have to add Gaussian-distributed noise after BPSK modulation. The noise should range from -8 to 7, since we're trying to code it in 4-bit 2's complement.

Now my problem is that I want the distribution of noise to vary with the length of the message and the variance. For example, if my row vector is 20 elements long I'd expect to see numbers starting off at -8 in the first element, numbers close to 0 by the 10th element and finally numbers close to 7 at the 20th element. So pretty much for my message length I should see the numbers distributed according to that example. I'm aware that for variance the easiest thing to do is multiply the output of the rand function by the square root, however if I do that I get numbers that fall out of that range.

Any ideas on how to get this going? I pretty much want to make this a separate function with the inputs being the length and variance. Remember that this needs to be in MATLAB code.

Please help! I'm on a deadline!
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top