A simulation gives the population numbers for every species in the domain per frame. These vary over time and can be quite noisy, for example we might have:
Species A: 1, 1, 2, 3, 4, 5, 5, 4, 3, 2, 1
Species B: 5, 4, 3, 3, 2, 2, 2, 1, 2, 3, 4
Fourier analysis gives:
Species A
[1] 31.0000000+0i -11.3435375+0i 0.7284459+0i -0.4486906+0i
[5] 0.6467467+0i 0.4170355+0i 0.4170355+0i 0.6467467+0i
[9] -0.4486906+0i 0.7284459+0i -11.3435375+0i
Species B
[1] 31.0000000+0.0000000i 7.7083901-1.7455710i 2.5347604+1.2715540i
[4] 0.0859162+0.3689912i 1.8966739-0.8223734i -0.2257406+0.1538824i
[7] -0.2257406-0.1538824i 1.8966739+0.8223734i 0.0859162-0.3689912i
[10] 2.5347604-1.2715540i 7.7083901+1.7455710i
How can I use this to give an idea if they are oscillating?
I wish to somehow use this in a genetic algorithm as the fitness function to see how close each dataset is to oscillating.
fft(c(1,1,2,3,4,5,5,4,3,2,1))andfft(c(5,4,3,3,2,2,2,1,2,3,4)). – Tomas Oct 26 '11 at 14:32