如何使用 mathematica 绘制斜率场?
我正在尝试使用 mathematica 绘制一些微分方程的斜率场,但无法弄清楚。假设我有方程
y' = y(t)
y(t) = C * E^t
如何绘制斜率场?
我找到了一个例子,但对我来说理解起来很复杂 http://demonstrations.wolfram.com/SlopeFields/
I am trying to plot slope fields of some differential equations using mathematica but can't figure it out. Say I have the equation
y' = y(t)
y(t) = C * E^t
How do I plot the slope field?
I found an example but way to complex for me to understand
http://demonstrations.wolfram.com/SlopeFields/
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要的命令(自版本 7 起)是
VectorPlot
。文档中有很好的示例。我认为您感兴趣的情况是一个微分方程
在您在问题中给出的情况下,
它积分为指数
我们可以绘制斜率场
(请参阅 wikibooks:ODE:Graphing)使用
东西用 DE 的解决方案来绘制
这可以使用类似
也许更有趣的例子是高斯
最后,还有一个梯度场的相关概念,您可以在其中查看函数的梯度(向量导数):
The command you need (since version 7) is
VectorPlot
. There are good examples in the documentation.I think the case that you're interested in is a differential equation
In the case you gave in your question,
Which integrates to the exponential
We can plot the slope field
(see wikibooks:ODE:Graphing) using
This can be plotted with the solutions to the DE using something like
Maybe a more interesting example is the Gaussian
Finally, there is a related concept of the gradient field, where you look at the gradient (vector derivative) of a function:
从您链接的演示中可以看出,它需要一个函数 f(x,y) 但您有一组微分。但是,知道
f(x,y)=y(x)'
,您可以只使用f(x,y)=C*E^x
其中x=t
。我的差速器可能有点生锈,但我很确定这是对的。It would appear from the demonstration you linked that it takes a function f(x,y) but you have a set of differentials. However, knowing that
f(x,y)=y(x)'
, you could just usef(x,y)=C*E^x
wherex=t
. My Differentials might be a little rusty, but I'm pretty sure that's right.