powered by
bsxfun.se(func, x, y, expandByRow = TRUE)
bsxfun
bsxfun.se("*", matrix(c(1:10), nrow=2), matrix(c(1:5), nrow=5))
Run the code above in your browser using DataLab