- 积分
- 0
- 注册时间
- 2010-5-19
- 仿真币
-
- 最后登录
- 1970-1-1
|
本帖最后由 FreddyMusic 于 2010-5-23 17:15 编辑
这是一本书里面的代码,在mathematica 5 里面能够运行出来,是一幅幅图形,但是在mathematica 7里面运行不出来,这是什么问题呢?
- For[n = 1, n < 50, n += 2, sn = Normal[Series[Sin[x], {x, 0, n}]];
- Plot[{sn, Sin[x]}, {x, -6 Pi, 6 Pi},
- PlotStyle -> {{RGBColor[1, 0, 0],
- Thickness[0.0075]}, {Thickness[0.0071]}}, PlotRange -> {-2, 2}]]
复制代码
换成如下代码,能够运行出结果,可是为什么上面的程序运行不出来结果呢?
- Manipulate[sn = Normal[Series[Sin[x], {x, 0, n}]];
- Plot[{sn, Sin[x]}, {x, -6, 6},
- PlotStyle -> {{RGBColor[1, 0, 0],
- Thickness[0.0075]}, {Thickness[0.0071]}}, PlotRange -> All], {n,
- 1, 50, 2}]
复制代码 |
|