Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Cobweb[x_, n_, A_] := Module[{a, b, CobList, CobList2, f},
- f = (-A #^p Log[#] &) /. {p -> 6/5};
- CobList = NestList[f, x, n];
- CobList2 = Append[Rest[CobList], f[CobList[[-1]]]];
- a = Partition[Append[Riffle[CobList, CobList2], {0, x}], 2, 1];
- b = Plot[f[y], {y, 0, 1}];
- Show[ListPlot[a, Joined -> True, PlotStyle -> Red], b,
- Plot[y, {y, 0, 1}]]]
- Cobweb[.4, 50, .56]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement