Making a vector

The simplest way to make a vector is with an assignment to a range. For example, X = [1:5], makes a vector named X with elements {1,2,3,4,5}.

A vector can also be made with an assignment to a list. For example, X = [1;23;-3;5;10], where the elements of a list are separated by semicolons.

The GENERATE command also makes a vector, e.g.,

command resultant vector X
GENERATE X 0,1,,4 4 elements: {0,1,2,3}
GENERATE X 0,1,4 5 elements: {0,1,2,3,4}
GENERATE X 0,,4,9 9 elements {0,.5,1,1.5,2,2.5,3,3.5,4}
GENERATE/RANDOM X 0,5,10   10 random elements with values between 0 and 5.

  String variables