MatrixMultiplier: matrixMultiplier

Description Usage Arguments Value Author(s) Examples

Description

Multiplies two inputted matrices and returns their product

Usage

1

Arguments

a

first matrix

b

second matrix

Value

Returns the product of the two input matrices (a*b)

Author(s)

Matt Heffernan, University of Illinois at Chicago

Examples

 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)
}

mheffe3/MyFirstPackage documentation built on Dec. 21, 2021, 5:52 p.m.