qdiag function

Fast extraction of matrix diagonal

Fast extraction of matrix diagonal

qdiag(x)

Arguments

  • x: The matrix to extract the diagonal from

Returns

A vector with the diagonal elements

Details

Note this function can only be used for extraction

Author(s)

Claus Ekstrom claus@rprimer.dk

  • Maintainer: Claus Thorn Ekstrøm
  • License: GPL-2
  • Last published: 2023-08-20