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

Home » Public Forums » archive » The Logistic Map
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
The Logistic Map [message #1835] Thu, 03 March 1994 13:00
darren is currently offline  darren
Messages: 5
Registered: March 1994
Junior Member
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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Thickening the x-axis
Next Topic: Shade_surf : HELP

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

Current Time: Wed Oct 08 19:22:02 PDT 2025

Total time taken to generate the page: 0.00549 seconds