Sign in

username:

password:



Not a member?

Search compdsp



Search tips

comp.dsp by Keywords

Adaptive Filter | ADPCM | ADSP | ADSP-2181 | Aliasing | AMR | Anti-Aliasing | ARMA | Autocorrelation | AutoCovariance | Beamforming | Bessel | Blackfin | Butterworth | C6713 | CCS | Chebyshev | CIC Filter | Circular Convolution | Code Composer Studio | Comb Filter | Compression | Convolution | Cross Correlation | DCT | Decimation | Deconvolution | Demodulation | DM642 | DSP Boards | DSP/BIOS | DTMF | Echo Cancellation | Equalization | Equalizer | ETSI | EZLITE (Ez-kit Lite) | FFT | FFTW | FIR Filter | Fixed Point | FSK | G.711 | G.723 | G.729 | Gaussian Noise | Goertzel | GPIO | Hilbert Transform | IFFT | IIR Filter | Interpolation | Invariance | JTAG | Kalman | Laplace Transform | Levinson | LPC | McBSP | MIPS | Modulation | MPEG | Multirate | Notch Filter | Nyquist | OFDM | Oversampling | Pink Noise | Pitch | PLL | Polyphase | QAM | QDMA | Quantization | Quantizer | Radar | Random Noise | Reed Solomon | Remez | Resampling | RTDX | Sampling | Sharc | TI C6711 | Undersampling | Viterbi | Wavelets | White Noise | Wiener Filter | Windowing | XDS510PP | Z Transform

Ads

Discussion Groups

Free Online Books

See Also

Embedded SystemsFPGAElectronics

Discussion Groups | Comp.DSP | gaussian white noise generation

There are 25 messages in this thread.

You are currently looking at messages 0 to 10.


gaussian white noise generation - sita - 2006-01-18 01:46:00

hello

can any one please suggest me how to generate guassian white noise with
zero mean and variance 1 in matlab?

thanks.

______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: gaussian white noise generation - Naebad - 2006-01-18 02:09:00



"sita" <s...@gmail.com> wrote in message
news:1...@f14g2000cwb.googlegroups.com...
> hello
>
> can any one please suggest me how to generate guassian white noise with
> zero mean and variance 1 in matlab?
>
> thanks.
>
If you have uniform distributed noise you can take say 12 samples and
average them then subtract the dc level.This should be approx
Guassian.Repeat process for every 12 samples giving one Guassian sample.

Naebad


______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: gaussian white noise generation - Andor - 2006-01-18 03:49:00

Naebad wrote:

> > can any one please suggest me how to generate guassian white noise with
> > zero mean and variance 1 in matlab?
> >
> > thanks.
> >
> If you have uniform distributed noise you can take say 12 samples ...

There's that number again. There must be something about it that I
don't know about :-).

______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: gaussian white noise generation - Steve Underwood - 2006-01-18 04:31:00

Andor wrote:

>Naebad wrote:
>
>  
>
>>>can any one please suggest me how to generate guassian white noise with
>>>zero mean and variance 1 in matlab?
>>>
>>>thanks.
>>>
>>>      
>>>
>>If you have uniform distributed noise you can take say 12 samples ...
>>    
>>
>
>There's that number again. There must be something about it that I
>don't know about :-).
>  
>
There's nothing magic about 12. The more numbers you sum, the closer the 
result gets to gaussian. Where you stop is a kind of diminishing returns 
issue - or perhaps I should say a good enough for the application issue. 
Just summing 4 or 5 numbers achieves perfectly adequate results for many 
things. 12 is pretty accurate. For some reason I never figured out, some 
applications requiring only modest quality noise sum over 20 - comfort 
noise creation in the G.729 reference code is an example of this.

Regards,
Steve
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: gaussian white noise generation - Tsachi - 2006-01-18 04:57:00

Hi

Use the function randn.
(It generates white Gaussian samples with unit variance).

Tsachi.

______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: gaussian white noise generation - Andor - 2006-01-18 04:57:00

Steve Underwood wrote:

> Andor wrote:
>
> >Naebad wrote:
> >
> >
> >
> >>>can any one please suggest me how to generate guassian white noise with
> >>>zero mean and variance 1 in matlab?
> >>>
> >>>thanks.
> >>>
> >>>
> >>>
> >>If you have uniform distributed noise you can take say 12 samples ...
> >>
> >>
> >
> >There's that number again. There must be something about it that I
> >don't know about :-).
> >
> >
> There's nothing magic about 12.

I know - still, it props up too often to be chosen arbitrary (look for
the 12):

http://groups.google.ch/group/comp.dsp/msg/80f38cb25f383859?dmode=source
http://groups.google.ch/group/comp.dsp/msg/69edad18ddce40aa?dmode=source
http://groups.google.ch/group/comp.dsp/msg/85b614f280131be8?dmode=source
http://groups.google.ch/group/comp.dsp/msg/e3db95a1ce560b07?dmode=source
http://www.pitt.edu/~wpilib/statfaq/gaussfaq.html
www.physics.ohio-state.edu/ ~gan/teaching/spring04/Chapter3.pdf
http://www.create.ucsb.edu/pipermail/sc-users/2005-August/020193.html
www.bipm.fr/utils/common/pdf/nmij-bipm/WS-32.pdf
http://www.if.ufrj.br/teaching/compute/fortran/h2mol.for

Someone (perhaps Knuth?) must have told them so. Perhaps it originates
from bounding the error of the cumulative distribution functions in the
Berry-Essen theorem.

Regards,
Andor

______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: gaussian white noise generation - john - 2006-01-18 05:06:00

Andor wrote:
> Naebad wrote:
>
> > > can any one please suggest me how to generate guassian white noise with
> > > zero mean and variance 1 in matlab?
> > >
> > > thanks.
> > >
> > If you have uniform distributed noise you can take say 12 samples ...
>
> There's that number again. There must be something about it that I
> don't know about :-).

The 12 comes from the formula for the variance of a Uniform random
distribution over [a,b] which is (b-a)^2 / 12. It is the same 12 that
shows up when you derive the theoretical SNR of an A/D converter.

John

______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: gaussian white noise generation - Steve Underwood - 2006-01-18 05:33:00

Andor wrote:

>Steve Underwood wrote:
>
>  
>
>>Andor wrote:
>>
>>    
>>
>>>Naebad wrote:
>>>
>>>
>>>
>>>      
>>>
>>>>>can any one please suggest me how to generate guassian white noise with
>>>>>zero mean and variance 1 in matlab?
>>>>>
>>>>>thanks.
>>>>>
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>If you have uniform distributed noise you can take say 12 samples ...
>>>>
>>>>
>>>>        
>>>>
>>>There's that number again. There must be something about it that I
>>>don't know about :-).
>>>
>>>
>>>      
>>>
>>There's nothing magic about 12.
>>    
>>
>
>I know - still, it props up too often to be chosen arbitrary (look for
>the 12):
>
>http://groups.google.ch/group/comp.dsp/msg/80f38cb25f383859?dmode=source
>http://groups.google.ch/group/comp.dsp/msg/69edad18ddce40aa?dmode=source
>http://groups.google.ch/group/comp.dsp/msg/85b614f280131be8?dmode=source
>http://groups.google.ch/group/comp.dsp/msg/e3db95a1ce560b07?dmode=source
>http://www.pitt.edu/~wpilib/statfaq/gaussfaq.html
>www.physics.ohio-state.edu/ ~gan/teaching/spring04/Chapter3.pdf
>http://www.create.ucsb.edu/pipermail/sc-users/2005-August/020193.html
>www.bipm.fr/utils/common/pdf/nmij-bipm/WS-32.pdf
>http://www.if.ufrj.br/teaching/compute/fortran/h2mol.for
>
>Someone (perhaps Knuth?) must have told them so. Perhaps it originates
>from bounding the error of the cumulative distribution functions in the
>Berry-Essen theorem.
>
>Regards,
>Andor
>  
>
Or perhaps it the very Anglo-Saxon style engineering approach of "take a 
dozen random numbers". Of course, if anyone complains you are short 
changing them on precision, you have the option of baking 13 values 
instead of 12. :-)

Regards,
Steve
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: gaussian white noise generation - Jerry Avins - 2006-01-18 10:02:00

Naebad wrote:
> "sita" <s...@gmail.com> wrote in message
> news:1...@f14g2000cwb.googlegroups.com...
> 
>>hello
>>
>>can any one please suggest me how to generate guassian white noise with
>>zero mean and variance 1 in matlab?
>>
>>thanks.
>>
> 
> If you have uniform distributed noise you can take say 12 samples and
> average them then subtract the dc level.This should be approx
> Guassian.Repeat process for every 12 samples giving one Guassian sample.

What is the DC level of a single average? Assuming that the RNG is 
itself zero mean, you can omit the subtraction step.

Jerry
-- 
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: gaussian white noise generation - Jerry Avins - 2006-01-18 10:03:00

Andor wrote:
> Naebad wrote:
> 
> 
>>>can any one please suggest me how to generate guassian white noise with
>>>zero mean and variance 1 in matlab?
>>>
>>>thanks.
>>>
>>
>>If you have uniform distributed noise you can take say 12 samples ...
> 
> 
> There's that number again. There must be something about it that I
> don't know about :-).

Six works pretty well too. 13 is better; you have to stop somewhere.

Jerry
-- 
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

| 1 | 2 | 3 | next