Working with Matrices

Matrix expressions are entered in the OML window at the >> prompt. They can also be entered as parameters to a subset of Embed blocks.

Matrix expressions consist of matrix functions, operators, constants and variables. The following syntax rules apply:

      Certain operators, like matrix multiply (*), require that the inner and outer dimensions agree.

      Constant matrices can be entered using a bracketed ([]) notation. For example:


produces a vector with 10 columns, numbered 1 through 10.

You can add an optional third argument to control the increment. For example:


produces a vector with five columns, numbered 2, 4, 6, 8, and 10.

matrices three arguments

      Separate each element with a space (to start a new column) or semi-colon (to start a new row).

      Elements of a matrix may be referenced using parentheses surrounding a row, column expression.

      If you use a colon (:) as the row or column index, it refers to the entire row or column.