R/diagstack.R

Defines functions diagstack

Documented in diagstack

diagstack <-
function(A,b)
# stack b copies of matrix A diagonally
{
  B <- kronecker(diag(b),A,make.dimnames=T)
  return(B)
}

Try the dmm package in your browser

Any scripts or data that you put into this service are public.

dmm documentation built on Aug. 21, 2025, 5:57 p.m.