Purpose |
To simplify Matrix Algebra calculations. |

Syntax |
MAT MAT MAT MAT MAT MAT MAT MAT MAT MAT MAT |

Remarks |
Array names with the MAT statements may optionally include a set of empty parentheses. The following are both equally valid, but the inclusion of the parentheses improves clarity of the code: MAT a1 = CON MAT a1() = CON MAT CON, IDN ZER + - = and TRN operations are valid with Byte, Word, Double-word, Integer, Long-integer, Quad-integer, Single-precision, Double-precision and Extended-precision arrays. Matrix * and INV operations support all
It is the programmer's responsibility to ensure that arrays used with MAT are of the appropriate size and type. All operations involving two or more arrays require that they be of exactly the same size and type, without exception. Failure to adhere causes undefined results. In the interest of execution speed, no error checking is performed at run-time. Every scalar value denoted here as |

Example |
MAT This establishes Each element of MAT array1() = TRN(array2()) Transposes the row and columns from MAT array1() = INV(array2()) Inverts the array from MAT a() = b() * c() Array multiplication occurs as follows: ' Row Column assumption: ' array [a]l,n = [b]l,m * [c]m,n
FOR i = 1 TO l ' Row [a]l = Row [b]l FOR j = 1 TO n ' Column [a]n = Column [c]n a(i,j) = 0# ' # if Double-precision FOR k = 1 TO m ' Column [b]m = Row [c]m a(i,j) = a(i,j) + b(l,k) * c(k,j) NEXT NEXT NEXT |