rdiag function

right (i.e., post) Multiply a matrix by a diagonal matrix

right (i.e., post) Multiply a matrix by a diagonal matrix

rdiag: right (i.e., post) Multiply a matrix by a diagonal matrix (with only the diagonal elements being given).

rdiag(X, y)

Arguments

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

Returns

an II by JJ matrix equal to X

See Also

ldiag

Author(s)

Hervé Abdi

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

Useful links