:
Range operator.
Syntax
R = A:B:C
Inputs
- A
- Starting operand.
- B
- Increment operand.
- C
- Ending operand.
Outputs
- R
- Row vector of equally spaced values.
Examples
R = 1:5
R = [Matrix] 1 x 5
1 2 3 4 5
R = 1:3:10
R = [Matrix] 1 x 4
1 4 7 10
Comments
Creates a row vector of all scalars from the first operand incremented by the second (if given) to the last operand. If no incremental operand is given second operand defaults to 1.