Attributes of matrix

If A is an matrix, then
A.length returns
A.nrows returns
A.ncolumns returns
A.size returns column vector
A.abs returns a copy of A whose elements are absolute values of A
A.norm returns the vector norm (if A is a row or column vector), or matrix norm of A.
A.sum returns the sum of all elements of A
A.max returns the maximum of all elements of A
A.min returns the minimum of all elements of A
A.range returns [m1, m2], where m1 and m2 are the minimum and maximum of A.
A.mean returns the average of all elements of A
A.var returns the variance of all elements of A
A.stddev returns the standard deviation of all elements of A

A.rowsum returns the sum of all each row of A
A.rowmax returns the maximum of each row of A
A.rowmin returns the minimum of each row of A
A.rowrange returns the range of each row of A A.rowmean returns the average of each row of A
A.rowvar returns the variance of each row of A
A.rowstddev returns the standard deviation of each row of A
A.columnsum returns the sum of all each column of A
A.columnmax returns the maximum of each column of A
A.columnmin returns the minimum of each column of A
A.columnrange returns the range of each column of A A.columnmean returns the average of each column of A
A.columnvar returns the variance of each column of A
A.columnstddev returns the standard deviation of each column of A

A.sort() sorts the elements of A in ascending order

A.rowsort() sorts each row of A in ascending order

A.columnsort() sorts each column of A in ascending order

A.reverse() reverses the order of all elements

A.rowreverse() reverses the order of all elements in each row

A.columnreverse() reverses the order of all elements in each column

A.swaprows(j, k) swaps row j and row k of A
A.swapcolumns(j, k) swaps column j and column k of A
A.scalerow(j, alpha) multiply row j of A by a scalar alpha
A.scalecolumn(j, alpha) multiply column j of A by a scalar alpha
A.addrows(j, k, alpha) add alpha times of row k to row j of A
A.addcolumns(j, k, alpha) add alpha times of column k to column j of A

oz 2009-12-22