Advertisement
Guest User

Untitled

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