Spice3f5

cross

Make a vector in a strange way

General form

cross name index expr [expr ...]

Make a new vector called name from element index of each of the vectors given: the first element of name is element index of the first vector, and so on. Indices count from 0. A vector too short to have that element contributes 0. The result is complex if any of the vectors is.

This takes a "cross-section" through a set of vectors, for example the value of several node voltages at the same point.

Example

cross vmid 50 v(1) v(2) v(3)

makes vmid a vector of 3 values: the 51st value of each of v(1), v(2) and v(3).

All commands