Tips:Rank of a matrix

From sasCommunity
Jump to: navigation, search

This is a simple tip that came from Dale McLerran during a discussion about invertibility of matrices.

SAS/IML does not have an inbuilt function to produce the rank of a matrix. The inbuilt rank function ranks the entries of the matrix.

In order to obtain the rank, one can use the following function.

ranka=round(trace(ginv(a)*a));

Submitted by Murphy Choy. Contact me at my Discussion Page.

....see also