next up previous contents index
Next: The cross Command Up: Data Manipulation Commands Previous: Data Manipulation Commands   Contents   Index


The compose Command

The compose command is used to create vectors. It has three forms:

compose vecname values value [...]
or

compose vecname pattern [n1 [n2]] bstring [modifiers] [...]
or

compose vecname param = value [...]

All forms of this command create a new vector called vecname. In the first form, indicated by the keyword ``values'', the given values are concatenated to form the vector. The second form creates a binary pattern of 1 and 0 values based on the given pattern specification to be described. In the third form, the values in the vector are determined by the parameters given, as will be described.

The pattern generation syntax given in the second form is as used in pulse source. See 2.15.3.5 for a complete description of the bstring and modifier syntax and usage. The optional preceding numbers n1 and n2 apply only when infinite repetition (r=-1) is given in the modifier: neither given will will cause the vector to end at the sequence end, with no repeat. If n1 only is given, this number is taken as the maximum length of the vector. If both n1 and n2 are given, the two numbers are taken as step and stop, with the maximum length stop/step. This is convenient for setting the length to match a transient analysis specification.

In the third form, there are three groups of possible parameter sets. The first set facilitates creation of uniform arrays. This set contains the following parameters.

start The value at which the vector should start
stop The value at which the vector should end
step The difference between successive elements
lin The number of points, linearly spaced
log The number of points, logarithmically spaced
dec The number of points per decade, logarithmically spaced

The words ``len'' and ``length'' are synonyms for ``lin''. A subset of these parameters that provides the information needed is sufficient. If all four are given, the point count and step value must be consistent or the command will fail. The parameter start defaults to zero, unless implicitly set by other parameters. The stop and step have no defaults and must be supplied unless implied by other parameters. If the lin parameter is not given, the other parameters determine the vector length.

The second parameter group generates Gaussian random values.

gauss The number of points in the gaussian distribution
mean The mean value for the gaussian distribution
sd The standard deviation for the gaussian distribution

The gauss parameter is required, sd defaults to 1.0, and mean defaults to 0. The random number sequences can be reset by calling the seed command.

The third parameter group generates uniform random values.

random The number of randomly selected points
center Where to center the range of points
span The size of the range of points

The random parameter is required, span defaults to 2.0, and center defaults to 0. The random number sequences can be reset by calling the seed command.


next up previous contents index
Next: The cross Command Up: Data Manipulation Commands Previous: Data Manipulation Commands   Contents   Index
Stephen R. Whiteley 2024-10-26