Learn R Programming

rTensor (version 1.4.9)

khatri_rao: Khatri-Rao Product

Description

Returns the Khatri-Rao (column-wise Kronecker) product of two matrices. If the inputs are vectors then this is the same as the Kronecker product.

Usage

khatri_rao(x, y)

Value

matrix that is the Khatri-Rao product

Arguments

x

first matrix

y

second matrix

See Also

kronecker, khatri_rao_list

Examples

Run this code
dim(khatri_rao(matrix(runif(12),ncol=4),matrix(runif(12),ncol=4)))

Run the code above in your browser using DataLab