I need some white noise, which I then can shape to have the required spectrum using filters. But how to I generate white noise?
I could do it using rand
or randn
:
noise1=rand(Int(1e6)).-0.5
noise2=randn(Int(1e6))
I get
using Statistics
julia> var(noise1)
0.08329181864907934
julia> var(noise2)
0.9997758048382285
If I would multiply noise1 with a factor, would the spectrum be the same as the spectrum of noise2?