ZBLOG

rLowest = data[[Ordering[data[[All, 2]]][[1]]]]; ListPlot[data, PlotRange -> All, Frame -> True, Axes -> False, FrameLabel -> {"r", "!(*FractionBox[(r^2y), (r - 1 - Log[r])])"}, PlotStyle -> PointSize[Tiny], Epilog

可以尝试将代码分为两部分,第一部分定义函数和计算数据,第二部分绘制图形:

f[r_, y_] := (r^2*y)/(r - 1 - Log[r]);
yIter[r_] := Block[{y0 = 0}, FixedPoint[(# /. y -> Function @@ {1 - Exp[-r #]}) &, y0, 50]];
rList = Range[0, 4, 4/999];
data = Table[{rList[[i]], f[rList[[i]], yIter[rList[[i]]]]}, {i, 1, 1000}];

rLowest = data[[Ordering[data[[All, 2]]][[1]]]];
plot = ListPlot[data, PlotRange -> All, Frame -> True, Axes -> False, 
  FrameLabel -> {"r", "!(*FractionBox[(r^2*y), (r - 1 - Log[r])])"}, 
  PlotStyle -> PointSize[Tiny], Epilog -> {Red, PointSize[Medium], Point[rLowest]}]

Show[plot]

这样可以避免“SetDelayed”问题。

本站部分文章来源于网络,版权归原作者所有,如有侵权请联系站长删除。
转载请注明出处:https://sdn.0voice.com/?id=267

分享:
扫描分享到社交APP
上一篇
下一篇
发表列表
游客 游客
此处应有掌声~
评论列表

还没有评论,快来说点什么吧~

联系我们

在线咨询: 点击这里给我发消息

微信号:3007537140

上班时间: 10:30-22:30

关注我们
x

注册

已经有帐号?