mgs#
- AnsMath.mgs(mat, thresh='', **kwargs)#
Apply the Modified Gram-Schmidt (MGS) algorithm to a matrix.
The MGS algorithm is only applicable to dense matrices. Columns that are linearly dependent on others are removed, leaving the independent or basis vectors. The matrix is resized according to the new size determined by the algorithm.
- Parameters:
Examples
Apply the MGS algorithm on an existing dense rectangular matrix, using the default threshold. The AnsMath matrix is modified in-situ.
>>> mm.mgs(mat)