Graphics |
Three-Dimensional Quiver Plots
Three-dimensional quiver plots (quiver3
) display vectors consisting of (u,v,w) components at (x,y,z) locations. For example, you can show the path of a projectile as a function of time,
First, assign values to the constants vz
and a
.
Then, calculate the height z,
as time varies from 0
to 1
in increments of 0.1
.
Calculate the position in the x and y directions.
Compute the components of the velocity vectors and display the vectors using the 3-D quiver plot.
u = gradient(x); v = gradient(y); w = gradient(z); scale = 0; quiver3(x,y,z,u,v,w,scale) view([70 18])
Two-Dimensional Quiver Plots | Contour Plots |
© 1994-2005 The MathWorks, Inc.