comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Random numbers with predefined spectral density
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Random numbers with predefined spectral density [message #4945 is a reply to message #4853] Tue, 22 August 1995 00:00 Go to previous message
steinhh is currently offline  steinhh
Messages: 260
Registered: June 1994
Senior Member
In article <41ab22$jp5@rs18.hrz.th-darmstadt.de>, hahn@hrz.th-darmstadt.de (Norbert Hahn) writes:
|>
|> I want to calculate random numbers with other than white noise
|> spectrum. The noise spectrum (amplitude vs. frequency) is
|> given and I need random numbers that adhere to this spectrum.
|>
|> Actually, the spectrum is given by a FIR filter of order 12:
|> coeff = [ 1.48, 1.64, 0.927, ..., 3.1e-3]
|>
|> How to proceed from here ?
|>
|> Norbert Hahn

Simply produce white noise, and filter it with your desired noise
spectrum (beware of the difference between *amplitude* and the
*power* spectrum).

Given N = Noise amplitude vs. frequency, an array with NN elements,
you simply use:

NOISE = fft( fft(randomn(seed,NN),-1)*N , 1)

You should also include some renormalization of the total power
in your noise, of course.

Stein Vidar
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Compound widget problem
Next Topic: IDL -> Fortran: Summary

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 15 23:44:42 PDT 2025

Total time taken to generate the page: 2.80445 seconds