DSPRelated.com
Forums

generating random waveform with gussian pdf

Started by altaanah2000 December 19, 2006
Good day all,

Want to make a program that generate a random waveform with a Gaussian
pdf of zero mean and 2 Volts rms. Using vector of length 2048 and let
the voltage values in the vector represent samples taken at
1millisecond intervals, so that the total duration of the signal is
2048 millisecond.

plot the results waveform

calculate the mean-square value of the wave form

I know how to generate the waveform: rand(1,2048) is that right?

now how to do the Gaussian pdf for zero mean and 2Volts rms?

can anyone help.
Hi;
You can use randn comman which is gaussian dist.("rand" is uniformly distrubuted random values) .
sqrt(V)*randn(1,2048) will give you a gaussian array with the variance "V". For the use of RMS i think you should add "2" to the whole array. (Because randn generates zero mean array)
I hope it helps
Regards

Emre