Fast extraction of matrix diagonal

qdiag(x)

Arguments

x

The matrix to extract the diagonal from

Value

A vector with the diagonal elements

Details

Note this function can only be used for extraction