R/Kron.R

Defines functions Kron

Documented in Kron

Kron <-
function(a, b){
    a <- as.matrix(a)
    b <- as.matrix(b)
    ni <- nrow(a)
    nj <- nrow(b)
    p <- ncol(a)
    q <- ncol(b)
    ab <- a %o% b    #ab di dimensione IxpxJxq
    ab <- aperm(ab, c(1, 3, 2, 4))	# bc di dimensione IxJ xpxq
    dim(ab) <- c(ni * nj, p * q)
    ab
}

Try the CA3variants package in your browser

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

CA3variants documentation built on Oct. 10, 2022, 5:07 p.m.