Hi to all,
i'm a phisicist and i need to generate in c, c++ a source of white noise but with a cut-off frequency.
Can anybody help me?
Generating white noise with cut-off frequency
Started by elsesma, Aug 30 2007 05:47 AM
6 replies to this topic
#1
Posted 30 August 2007 - 05:47 AM
|
|
|
#2
Posted 30 August 2007 - 07:56 AM
Before worrying about the language, I would worry about the algorithm. Perhaps selecting 20 random frequencies/amplitudes and merging them together? You would need to characterize what counts as "white noise" a little more precisely for those of us who are not physicists.
#3
Posted 30 August 2007 - 10:21 PM
look up the Boxcar algorithm. normally used in WAV samples, but it can be applied to near any waveform.
#4
Posted 31 August 2007 - 01:20 AM
yes, sorry, i wasn't that clear, also becouse there are a lot of misunderstanding about what white noise would mean.
In my case i mean a signal made (theoretically) of the whole continuum spectrum of frequencies in the range (0:F], where F is my cutoff frequency and with each frequency having the same intensity (so that the power spectrum is constant and, in particular, i will require that the integral over the spectrum is one ).
In the case i don't have a cutpff frequency, i would just use the pseudo-random number generator of c/c++.
So, what do you think is the best way to implement it?
Thank you
In my case i mean a signal made (theoretically) of the whole continuum spectrum of frequencies in the range (0:F], where F is my cutoff frequency and with each frequency having the same intensity (so that the power spectrum is constant and, in particular, i will require that the integral over the spectrum is one ).
In the case i don't have a cutpff frequency, i would just use the pseudo-random number generator of c/c++.
So, what do you think is the best way to implement it?
Thank you
#5
Posted 31 August 2007 - 08:14 AM
I would use the pseudo-random number generator, which produces a number in the range [0,1] if I remember correctly, and multiply the result by F.
#6
Posted 31 August 2007 - 08:27 AM
mmm, that not for shure. That way i will get i a pseudorandom number between 0 and F...
Anyway i'm doing this by fourier trasformation and some integrals, but it's sooo sloooowwww
Anyway i'm doing this by fourier trasformation and some integrals, but it's sooo sloooowwww
#7
Posted 31 August 2007 - 08:28 AM
ah, i was forgetting:
i look up for the boxcar algorithm, but didn't find anything about wave form. Do you have some direct link?
i look up for the boxcar algorithm, but didn't find anything about wave form. Do you have some direct link?


Sign In
Create Account

Back to top









