From: Screech on
I am constructing a bifurcation diagram for interval 0.15 <= alpha <= 0.75 but it always go into loop and can't find an error. I used word alpha for greek symbol.

recursive equation is:
In[1]:= f[x_]:=(1-alpha)x+((alpha*0.8)/0.25)-((alpha*ArcTan[4x])/0.25)
In[2]:= f[x]


I used:

ListPlot[
Flatten[Table[
Transpose[{
Table [alpha, {129}],
NestList[f, Nest[f,0.5,500],128]
}],
{alpha,0,0.75,0.001}
],1],
PlotStyle->PointSize[0.001],Axes->False,Frame->True];

Can anyone help me please?

From: David Park on
One thing I don't understand is why users so often put an extensive
calculation inside a plot statement, and then if it goes wrong they never
think of taking it out and looking at it.

In this case you could just use Evaluate on the first argument in the
ListPlot. But why not use...

plotpoints =
Flatten[Table[
Transpose[{Table[alpha, {129}],
NestList[f, Nest[f, 0.5, 500], 128]}], {alpha, 0, 0.75, 0.001}],
1]

Now you can see that you obtain a very long list of points suitable for
plotting. Then, make the plot with the pre-computed points.

ListPlot[plotpoints, PlotStyle -> PointSize[0.001], Axes -> False,
Frame -> True]

Among other advantages, if you wanted to change the PlotStyle or other
aspects of the plot, you wouldn't have to recomputed all the points each
time.


David Park
djmpark(a)comcast.net
http://home.comcast.net/~djmpark/





From: Screech [mailto:dildovpizdo(a)gmail.com]

I am constructing a bifurcation diagram for interval 0.15 <= alpha <= 0.75
but it always go into loop and can't find an error. I used word alpha for
greek symbol.

recursive equation is:
In[1]:= f[x_]:=(1-alpha)x+((alpha*0.8)/0.25)-((alpha*ArcTan[4x])/0.25)
In[2]:= f[x]


I used:

ListPlot[
Flatten[Table[
Transpose[{
Table [alpha, {129}],
NestList[f, Nest[f,0.5,500],128]
}],
{alpha,0,0.75,0.001}
],1],
PlotStyle->PointSize[0.001],Axes->False,Frame->True];

Can anyone help me please?



From: ADL on
David,
the reason is simply that most books on Mathematica, with the sole
purpose to astonish the readers with useless "one-liners" one page
long, never split calculations. The final effect is just to encourage
readers to do this sort of things and induce bad programming style in
Mathematica users.

ADL

On 8 Lug, 09:15, "David Park" <djmp...(a)comcast.net> wrote:
> One thing I don't understand is why users so often put an extensive
> calculation inside a plot statement, and then if it goes wrong they never
> think of taking it out and looking at it.
>
> ...
>
> David Park

From: Ales on
This problem must be from some book as I solved it few years ago. In your first line In[1] multiplication signs (*) are missing and then it won't loop.