Vectors posses a dimensionality. A scalar is a vector of the lowest dimensionality. Most vectors are one-dimensional lists of numbers. Certain types of analysis produce multidimensional vectors, which are analogous to arrays. This dimensionality is indicated when the vectors are listed with the display command or the let command without arguments. Plotting a multidimensional vector will produce a family of traces. Elements and sub-dimensional vectors are specified with multiple square brackets, with the bracket on the right having the lowest dimensionality.
For example, one might issue the following command:
.ac dec 10 1Hz 1Mhz dc v1 0 2 .1 v2 4.5 5.5 .25which will perform an ac analysis with the dc sources v1 and v2 stepped through the ranges 0-2 step .1 for v1, 4.5-5.5 step .25 for v2. The resulting output vectors will have dimensions [5,21,61], i.e., 5 values for v2, 21 for v1, and 61 for the ac analysis. Typing ``plot v(1)'' (for example) would plot all 21*5 analyses on the same scale (this would not be too useful). However, one can plot subranges by entering, for example, ``plot v(1)'' which would plot the results for v2 = 4.75, or ``plot v(1)'' for v2 = 4.75, v1 = .2, etc. Range specifications also work, for example ``plot v(1)[0,2]'' plots the values for v2 = 5, v1 = 0, .1, .2. The memory space required to hold the multidimensional plot data can grow quite large, so one should be reasonable.
Vectors have an indexing that begins with 0, and an index, or range of indices, can be specified in square brackets following the vector name, for each dimension. The notation [lower,upper], where lower and upper are integers, denotes the range of elements between lower and upper. The notation [num] denotes the num'th element. If upper is less than lower, the order of the elements is reversed.
Vectors typically have defined units. The units are carried through a computation, and simplified when the result is generated. Presently, the system can not handle fractional powers. The units of a vector can be set with the settype command.