A vector field is made up of points (x, y) and arrows. The length and direction of the arrow emerging
from each point correspond to the magnitude
and direction of the vector associated with the point. There are two ways to set up the data needed for a vector field plot:
Create a matrix of complex numbers in which the following conditions exist:
The row and column numbers represent the x- and y-coordinates.
The real part of each matrix element is the x-component of the vector associated with that row and column.
The imaginary part of each element is the y-component of the vector associated with that row and column.
Create two matrices having the same number of rows and columns. The first matrix should have the x-components of the vectors, the second the y-components.
Type the name of the matrix, or two matrices separated by commas and enclosed by parentheses, in the
placeholder to the bottom left of the
plot region.
The vector field appears as a set of thin black arrows. You can double-click the plot to change formatting
options.
Notes:
The location of an element in a matrix gives the location of the tail end
of the corresponding vector in the x-y plane.