ldiag function

Left (i.e., pre) Multiply a matrix by a diagonal matrix

Left (i.e., pre) Multiply a matrix by a diagonal matrix

ldiag: Left (i.e., pre) Multiply a matrix by a diagonal matrix (with only the diagonal elements being given).

ldiag(y, X)

Arguments

  • y: a II element vector (of the diagonal elements of an II by II matrix)
  • X: an II by JJ matrix.

Returns

an II by JJ matrix equal to diag(y )

See Also

rdiag

Author(s)

Hervé Abdi

  • Maintainer: Herve Abdi
  • License: GPL-2
  • Last published: 2022-12-05

Useful links