Vector Processor commands. Vectors are equivalent to FORTRAN 77 arrays and they use the same notation except when omitting indexes (see last line below). Up to 3 dimensions are supported. Examples:
may be addressed by:
may be addressed by:
The latest line shows the special (and non-standard with FORTRAN 77) notation such that missing indexes are substituted to the right.
An 'invisible' vector called '?', mono-dimensional and of length 100, is always present. Is is used for communicating between user arrays and KUIP vectors, being equivalenced with the real array VECTOR(100) in the labeled common block /KCWORK/.
TYPE:
Create a vector named VNAME (elements are set to zero). The dimensions are taken from the name, for example VEC(20), VEC(3,100), VEC(2,2,10). Up to 3 dimensions are supported. Dimensions which are not specified are taken to 1, for example VEC(10) ---> VEC(10,1,1) and VEC ---> VEC(1,1,1). The vector may be of type Real or Integer. A vector is filled at the same time if parameters are given after the TYPE:
In the last example only the first three elements are filled. Vector elements may be changed later with the command VECTOR/INPUT.
If many equal values have to be entered consecutively, one can specify just one value and precede it by a repetition factor and an asterisk. Example:
Enter HELP VECTOR for more information on vector addressing.
List all vectors (name, dimensions, type).
Delete from memory all vectors in the list VLIST. The vectors are separated in the list by a comma and embedded blanks are not allowed. An asterisk at the end of VLIST acts as wild-card:
Copy a vector into another one. Mixed vector type copy is supported (e.g. Integer ---> Real and viceversa). If VNAM2 does not exist it is created with the required dimensions, not necessarily the same as the source vector if a sub-range was specified. For example, if A is a 3 x 100 vector and B does not exist, COPY A(2,11:60) B will create B as a 50 elements mono-dimensional vector; a special (and non-standard with FORTRAN 77) notation is used such that, still using the above vectors, COPY A(2,1:100) B and COPY A(2) B have the same effect.
Note that VECTOR/COPY does not allow a range for the destination vector not specifying consecutive elements (i.e. along the first dimension):
Enter HELP VECTOR for more information on vector addressing.
Enter values into a vector from the terminal. Example:
If many equal values have to be entered consecutively, one can specify just one value and precede it by a repetition factor and an asterisk. Example:
Enter HELP VECTOR for more information on vector addressing.
Write to the terminal the content of a vector. Enter HELP VECTOR for more information on vector addressing.
If DENSE.EQ.0 the output is one vector element per line. If DENSE.EQ.1 the output for a sequence of identical vector elements is compressed to two lines stating the start and end indices. If DENSE.EQ.2 the output for a sequence of identical vector elements is compressed to a single line.
OPT:
Enter values into vector(s) from a file. A format can be specified, e.g. FORMAT='F10.5,2X,F10.5', or the free format is used if FORMAT is not supplied.
If vector(s) are not existing they will be created of the size as read from the file.
Vectors in the list VLIST (maximum 30) are separated by a comma and embedded blanks are not allowed. If subscripts are present in vector names, the smallest one is taken.
OPT is used to select between the following options:
If the character 'Z' is present in OPT, the vector elements equal to zero after reading are set to the latest non-zero element value (for example reading 1 2 3 0 0 4 0 5 will give 1 2 3 3 3 4 4 5).
MATCH is used to specify a pattern string, restricting the vector filling only to the records in the file which verify the pattern. Example of patterns:
Enter HELP VECTOR for more information on vector addressing.
CHOPT:
Write to a file the content of vector(s). If FNAME=' ' the content is written to the terminal. A format can be specified, e.g. FORMAT='F10.5,2X,F10.5', or the default one is used if FORMAT is not supplied.
Vectors in the list VLIST (maximum 30) are separated by a comma and embedded blanks are not allowed. If subscripts are present in vector names, the smallest one is taken.
CHOPT is used to select between the following options:
Enter HELP VECTOR for more information on vector addressing.
CHOPT:
Draw vector VNAME (real) interpreting it as a histogram. Optionally save the contents in histogram ID.
Fill the existing histogram ID with vector VNAME (real) . Note that the command VECTOR/PLOT can automatically book, fill and plot the contents of a vector.
CHOPT:
Each element of VNAME (real) is used to fill an histogram which is automatically booked with 100 channels and then plotted. If VNAME has the form VNAME1%VNAME2 then a scatter-plot of vector VNAME1 versus VNAME2 is plotted. If ID is given different of 12345, then a 2-Dim histogram is created with 40 bins by 40 bins and filled. One can use the command VECTOR/HFILL to fill an already existing histogram. When option 'S' is used, the limits of the current plot are used to create the 1D histogram.
CHOPT:
Fit a user defined function to the points defined by the two vectors X and Y and the vector of associated errors EY. See command Histo/Fit for explanation of parameters. Note that if option 'W' is specified or EY='?' (default), the array EY is ignored. Option 'L' is not available.