Matrix Notation Shorthand (MATRIX-END MATRIX command)

You can simplify the construction of matrices using notation shorthand.

Consecutive Integers. Use a colon to indicate a range of consecutive integers. For example, the vector {1,2,3,4,5,6} can be written as {1:6}.

Incremented Ranges of Integers. Use a second colon followed by an integer to indicate the increment. The matrix {1,3,5,7;2,5,8,11} can be written as {1:7:2;2:11:3}, where 1:7:2 indicates the integers from 1 to 7 incrementing by 2, and 2:11:3 indicates the integers from 2 to 11 incrementing by 3.

  • You must use integers when specifying a range in either of these ways. Numbers with fractional parts are truncated to integers.
  • If an arithmetic expression is used, it should be enclosed in parentheses.