- 注册时间
- 2015-8-20
- 最后登录
- 1970-1-1
- 威望
- 星
- 金币
- 枚
- 贡献
- 分
- 经验
- 点
- 鲜花
- 朵
- 魅力
- 点
- 上传
- 次
- 下载
- 次
- 积分
- 1307
- 在线时间
- 小时
|
发表于 2024-5-24 15:35:07
|
显示全部楼层
Mathematica 代码:
Lyapunov Exponents for the Logistic Map
- Manipulate[
- Column[{
- ListPlot[
- Flatten[logisticMapOrbitCF[#, n] & /[url=home.php?mod=space&uid=6175]@[/url]
- Range[a[[1]] - .04/magH, Min[1, a[[1]] + .04/magH],
- ControlActive[.6, 0.15]/magH/pts], 1],
- PlotStyle -> {RGBColor[.25, .43, .82], AbsolutePointSize[1]},
- PlotLabel -> Style["Bifurcation Diagram", 9],
- PlotRange -> {{a[[1]] - .04/magH,
- a[[1]] + .04/magH}, {a[[2]] - .52/magV, a[[2]] + .5/magV}},
- AxesOrigin -> {a[[1]] - .04/magH, Automatic},
- ImagePadding -> {{15, 12}, {20, 6}}, AspectRatio -> .65,
- ImageSize -> 500],
- ListPlot[{#, lyapListCF[#, n]} & /@
- Range[a[[1]] - .04/magH, Min[1, a[[1]] + .04/magH],
- ControlActive[.6, 0.15]/magH/pts],
- PlotLabel -> Style["Lyapunov Exponent", 9], Joined -> True,
- PlotStyle -> RGBColor[.49, 0, 0],
- PlotRange -> {{a[[1]] - .04/magH,
- a[[1]] + Min[1, .04/magH]}, {Full, .5}},
- AxesOrigin -> {a[[1]] - .04/magH, 0}, Ticks -> {Automatic, {0}},
- ImagePadding -> {{16, 12}, {12, 0}}, AspectRatio -> .14,
- ImageSize -> 500]}, Spacings -> 0, Frame -> True],
- {{a, {.85, 0.5}}, {0.7, 0}, {1, 1}, Locator,
- Appearance -> Style["\[CirclePlus]", RGBColor[.49, 0, 0], Bold, 18]},
- Style["zoom", Bold],
- "horizontal",
- {{magH, .26667, ""}, .1, 10, .1, VerticalSlider, ImageSize -> Small},
- Delimiter,
- "vertical",
- {{magV, 1, ""}, .1, 10, .1, VerticalSlider,
- ImageSize -> Small}, Delimiter,
- {{n, 1000, "number of iterates"}, ControlType -> None},
- {{pts, 2000, "number of \[Lambda] values"}, ControlType -> None},
- Button["reset", a = {.85, 0.5}; magH = .26667; magV = 1; n = 1000;
- pts = 2000],
- Button["detail", n = 2000; pts = 4000],
- ControlPlacement -> Left,
- AutorunSequencing -> {{1, 10}, {2, 5}, {3, 5}},
- TrackedSymbols :> {a, magH, magV, n, pts},
- Initialization :> (
- logisticMapOrbitCF =
- Compile[{{\[Lambda], _Real}, {n, _Integer}}, {\[Lambda], #} & /@
- Take[NestList[4. \[Lambda] # (1. - #) &, \[Lambda], n], -24]];
- lyapListCF =
- Compile[{{\[Lambda], _Real}, {n, _Integer}},
- Mean[(Log[Abs[4. \[Lambda] (1. - 2 #)]] & /@
- NestList[4. \[Lambda] # (1. - #) &, \[Lambda], n])]]
- )]
复制代码 |
|