| MATLAB Functions | Help Desk |
quiver3
Three-dimensional velocity plotquiver3(Z,U,V,W) quiver3(X,Y,Z,U,V,W) quiver3(...,scale) quiver3(...,A three-dimensional quiver plot displays vectors with components (u,v,w) at the points (x,y,z).LineSpec) quiver3(...,LineSpec,'filled') h = quiver3(...)
quiver3(Z,U,V,W)
plots the vectors at the equally spaced surface points specified by matrix Z. quiver3 automatically scales the vectors based on the distance between them to prevent them from overlapping.
quiver3(X,Y,Z,U,V,W)
plots vectors with components (u,v,w) at the points (x,y,z). The matrices X, Y, Z, U, V, W must all be the same size and contain the corresponding position and vector components.
quiver3(...,scale)
automatically scales the vectors to prevent them from overlapping, then multiplies them by scale. scale = 2 doubles their relative length and scale = 0.5 halves them. Use scale = 0 to plot the vectors without the automatic scaling.
quiver3(...,LineSpec)
specify line type and color using any valid line specification.
quiver3(...,LineSpec,'filled')
fills markers specified by LineSpec.
h = quiver3(...)
returns a vector of Line handles.
Plot the surface normals of the function
:
[X,Y] = meshgrid(-2:.2:2,-1:.15:1); Z = X.* exp(-X.^2-Y.^2); [U,V,W] = surfnorm(X,Y,Z); quiver3(X,Y,Z,U,V,W); hold on surf(X,Y,Z); grid on hold off
![]()
contour, LineSpec, plot, plot3, quiver