Mathematica 9 is now available
Student Support Forum
Student Support Forum: 'Using For Loop' topicStudent Support Forum > General > Archives > "Using For Loop"

Next Comment >Help | Reply To Topic
Author Comment/Response
Amina Mendez
02/21/12 11:39pm

I'm trying to solve for Lyapunov exponent of a logistic map.

Here is what I have:

a = 2.5
g[x_] := a x (1 - x);
summand[x_] := Log[Abs[a - 2 a x]];
h[x_] := Mean[Map[summand, NestList[g, x, 500]]];
Plot[h[x], {x, 0, 1}, PlotRange -> All]]

This is working but I want to do this for
2 <= a <= 4 (probably with .5 unit increments). I know for loop could help me, but I'm not sure how function definitions' scope work in Mathematica for loop.

Thank you for any help/bits of advice! :]

URL: ,

Subject (listing for 'Using For Loop')
Author Date Posted
Using For Loop Amina Mendez 02/21/12 11:39pm
Re: Using For Loop Bill Simpson 02/22/12 6:44pm
Re: Re: Using For Loop Amina Mendez 02/23/12 8:38pm
Next Comment >Help | Reply To Topic