Xref: utzoo comp.dsp:1256 sci.math:15045 comp.music:2551 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!edcastle!hwcs!fowler From: fowler@cs.hw.ac.uk (David W. Fowler) Newsgroups: comp.dsp,sci.math,comp.music Subject: Re: Want algorithm to generate 1/f time series Message-ID: <2274@odin.cs.hw.ac.uk> Date: 11 Feb 91 14:28:54 GMT References: <52654@sequent.UUCP> Sender: news@cs.hw.ac.uk Reply-To: fowler@cs.hw.ac.uk (David W. Fowler) Organization: Computer Science, Heriot-Watt U., Scotland Lines: 13 In article tomh.bbs@shark.cs.fau.edu (Tom Holroyd) writes: >rjk@sequent.uucp (Robert Kelley) writes: >> What I really want to do, is to generate >> a pseudo-random time series such that the spectral energy varies as 1/f >> (or, more generally, 1/(f**n)). > >Use a random walk. [1] x = 0. [2] r = random integer. >[3] if r is odd, add 1 to x, else subtract 1 from x. >[4] output x. [5] goto [2]. I think this gives 1/f**2 rather than 1/f. Martin Gardner in Mathematical Games, Scientific American, December(?) 1978 gives an algorithm for approximating 1/f fairly easily. I'll have to go home to look it up though.