use*_*102 2 plot wolfram-mathematica vector
我无法弄清楚如何用一个变量绘制一个矢量场.也许Mathematica不支持这一点.例如:
r(t) = cost j + sint i
Run Code Online (Sandbox Code Playgroud)
与...一样
<cost, sint>
Run Code Online (Sandbox Code Playgroud)
这不起作用:
VectorPlot[{cos t, sin t}, {t, 0, 2 Pi}]
Run Code Online (Sandbox Code Playgroud)
作为奖励如何获取向量的导数?
Thi*_*cke 13
一个简单的解决方法是使用VectorPlot带有虚拟变量的2D- ,如下所示:
VectorPlot[
{Cos[t], Sin[t]}, {t, 0, 2 \[Pi]}, {s, -1/2, 1/2},
AspectRatio -> Automatic,
VectorPoints -> {15, 3},
FrameLabel -> {"t", None}
]
Run Code Online (Sandbox Code Playgroud)

或者更有意义的是,在你增加时跟随矢量时得到的曲线离散化t.这对于量子力学中的费曼式动作积分是有用的.
Module[
{t, dt = 0.1, vectors, startpoints, startpoint, vector, spv, spvs},
vectors = Table[dt {Cos[t], Sin[t]}, {t, 0, 2 \[Pi], dt}];
startpoints = Accumulate[vectors];
spvs = Transpose[{startpoints, vectors}];
Graphics[Table[Arrow[{spv[[1]], spv[[1]] + spv[[2]]}], {spv, spvs}]]
]
Run Code Online (Sandbox Code Playgroud)

| 归档时间: |
|
| 查看次数: |
2962 次 |
| 最近记录: |