Description Usage Arguments Value Author(s) Examples
Multiplies two inputted matrices and returns their product
1 | matrixMultiplier(a,b)
|
a |
first matrix |
b |
second matrix |
Returns the product of the two input matrices (a*b)
Matt Heffernan, University of Illinois at Chicago
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | matrixMultiplier(M1 <- matrix(c(1,2,3,4), nrow = 2, byrow = TRUE),
M2 <- matrix(c(1,2,3,4), nrow = 2, byrow = TRUE))
Returns the product of these two matrices (ie. [,1] [,2] )
( [1,] 1 4 )
( [2,] 9 16 )
##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
matrixMultiplier <- function(a,b){
result <- a * b
return(result)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.