Creating a vector field plot
In a vector field plot, each point in the xy plane is assigned a two-dimensional vector. To create a vector field plot, you must define a rectangular array of points and assign a vector to each point. You can do this by creating a matrix of complex numbers in which:
• The rows and columns represent 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.
To create a vector field plot:
• Create a matrix as described above.
• Choose Graph-» Vector Field Plot from the Insert menu. Mathcad shows a box with a single placeholder as shown below:
• Type the name of the matrix in the placeholder.
Just as with an equation, Mathcad will not process the vector field plot until you click outside of it. Mathcad plots the matrix by rotating it so that the (0,0) element is at the lower-left comer. Thus the rows of the matrix correspond to values on the x-axis, increasing to the right, and the columns correspond to values along the y-axis, increasing toward the top.
What you’ll see is a collection of m . n vectors as shown in Figure 26-1. The base of each vector sits on the x and y values corresponding to its row and column. The magnitude and direction of each vector are derived from the real and imaginary parts of the matrix element.
You can also create a vector field plot by using two matrices of real numbers rather than a single matrix of complex members. The two matrices must have the same number of rews and columns. The first matrix should have the x components of the vectors; the second should have the y components. Figure 26-2 shows the same vector field as that shown in Figure 26-1, but it is plotted using two real matrices rather than a single complex matrix.
You can specify what labels and grid lines appear on the axes by formatting the vector field plot. This is described in “Formatting vector field plots”.
Resizing vector field plots
To change the size of a vector field plot, follow these steps:
• Click in the vector field plot to select it.
• Move the mouse pointer to one of the three handles along the edge of the plot. The pointer will change to a double-headed arrow
Press and hold down the mouse button. While holding down the button, move the mouse. The plot will stretch in the direction of motion.
• Once the plot is the right size, let go of the mouse button.
• Click outside the vector field plot to deselect