powered by
This function returns the Hadamard or element-wise product of two matrices \(\bold{X}\) and \(\bold{Y}\), that have the same dimensions.
hadamard(x, y = x)
A matrix with the same dimension of \(\bold{X}\) (and \(\bold{Y}\)) which corresponds to the element-by-element product of the two matrices.
a numeric matrix or vector.
Styan, G.P.H. (1973). Hadamard products and multivariate statistical analysis, Linear Algebra and Its Applications 6, 217-240.
x <- matrix(rep(1:10, times = 5), ncol = 5) y <- matrix(rep(1:5, each = 10), ncol = 5) z <- hadamard(x, y) z
Run the code above in your browser using DataLab