Vector Creation

Although there is no distinct vector type in RLaB  , you can pretend that there is. If your algorithm, or program does not need two dimensional arrays, then you can use matrices as singly dimensioned arrays.

When using vectors, or single dimension arrays, row matrices are created. The simplest way to create a vector is with the `:' operator(s), that is `start:end:inc'. The leftmost operand, start, specifies the starting value, the second operand, end, specifies the last value. The default increment, or spacing, is 1. A third optional operand, inc, can be used to specify any increment.

> v = 1:4
 v =
        1          2          3          4