comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: The Logistic Map

The Logistic Map
type: item
description: Keywords: Greetings. I am trying to plot out the evolution of the logistic equation, iterating x(i+1)=r*x(i)(1-x(i)), for r in [0,4). I'd like IDL to plot a point for each value through the iteration. The problems are that I keep getting floating underflows, and I can't generate the right results. The code is just this simple bit: Function Map, r, x return, r*x*(1.0-x) END Pro Logistic y = intarr(100) & y(*) = 0 plot, y, xrange = [0, 4], yrange = [0, 1] for i = 0,799 do begin r = i/200.0 x = 0.5 for j = 0, 299 do begin x = Map(r,x) endfor ; to get rid of transients for j = 0, 1999 do begin x = Map(r,x) k = fix(x * 600) ; plot the nearest integer ; to x*600 plots, r, k endfor END In addition to this particular example, is there a much more optimal way of doing recursive calculations in IDL about which I'm simply not aware? Thanks in advance. -Darren Orbach
creator: darren
date: 1994-03-03T21:00:24-00:00