| Contents | Index |
represents a plot of the vector field defined by
![]()
with
.
Calls:
plot::VectorField3d([v1, v2, v3], x =
..
, y =
..
, z =
..
, <a = amin .. amax>, Options)
plot::VectorField3d(v1, v2, v3, x =
..
, y =
..
, z =
..
, <a = amin .. amax>, Options)
Parameters:
|
v1, v2, v3: |
the |
|
x, y, z: |
identifiers. |
|
|
real numerical values. |
See Also:
plot, plot::copy, plot::Ode2d, plot::Ode3d, plot::VectorField2d
Details:
A vector field is defined by a function
. plot::VectorField3d displays a vector field by placing arrows at regular intervals with the arrow at
pointing in the direction
.
The length of the arrows depend on
and the setting of the attribute ArrowLength: By default, arrow lengths are proportional to the magnitude of
, but can be set to be of fixed length or to scale logarithmically.
The density of arrows placed can be controlled with the attributes XMesh, YMesh, ZMesh, and Mesh. See the examples below.
Example 1
We demonstrate a plot of the vector field
:
field := plot::VectorField3d([1, sin(x) + cos(y), sin(z)],
x = 0..6, y = 0..2.5, z = 0..5,
Mesh = [7, 7, 7]):
plot(field):

delete field:
Example 2
Like most other objects, plot::VectorField3d can be animated by supplying an extra parameter:
mycolor := (x, y, z, vx, vy, vz, a) -> [a, a*z, 1 - a]:
field := plot::VectorField3d([ a*y + (1-a)*x ,
-a*x + (1-a)*y,
a*sin(PI*z)],
x = -1..1, y = -1..1, z = 0..1,
LineColorFunction = mycolor,
Mesh = [7, 7, 7], a = 0..1):
text := plot::Text3d(a -> "a = ".stringlib::formatf(a, 2, 5),
[1, 0.7, 1.2], a = 0..1):
plot(field, text, Axes = Frame)


delete field, text:

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |