R/kron.R

Defines functions kron

Documented in kron

##
##  k r o n . R  Kronecker product
##


kron <- function(a, b) {	
	if (length(a) == 0 || length(b) == 0) return(c())
	if (!(is.numeric(a) || is.complex(a)) ||
		!(is.numeric(b) || is.complex(b)))
		stop("Arguments 'a' and 'b' must be real/complex vectors/matrices.")
	
	kronecker(a, b)
}

Try the pracma package in your browser

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

pracma documentation built on March 19, 2024, 3:05 a.m.