:

Range operator.

Syntax

R = A:B:C

Inputs

A
Starting operand.
Type: double | integer
Dimension: scalar
B
Increment operand.
Type: double | integer
Dimension: scalar
C
Ending operand.
Type: double | integer
Dimension: scalar

Outputs

R
Row vector of equally spaced values.

Examples

Implicit unit increment example:
R = 1:5
R = [Matrix] 1 x 5
1  2  3  4  5
Explicit increment example:
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.