声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 2383|回复: 0

[mathematica] 请教这个mathematica程序什么问题?

[复制链接]
发表于 2006-4-22 13:30 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

x
请教一下,这个用实现欧拉方法的程序怎么显示不出图形来呢?谢谢了!<BR>euler[f_, {t_, t0_, t1_, h_}, {x_, x0_}] =<BR>  Module[{ti, xi, graph}, ti = t0; xi = x0; graph = {{t0, x0}};<BR>    While[ti &lt; t1, xi = N[xi + hf /. {t -&gt; ti, x -&gt; xi}]; ti = ti + h;<BR>      AppendTo[graph, {ti, xi}]]; ListPlot[graph]   ]<BR>pic2 = euler[f[t, p], {t, 0, 15, 0.5}, {p, 20}]
回复
分享到:

使用道具 举报

您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-5-13 19:23 , Processed in 0.112138 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表