Learn R Programming

tropAlgebra (version 0.1.1)

tmatrixMultiply: Tropical Product of Matrices

Description

This function returns the product of two matrices. This function works only if columns of first matrix eqaual to rows of seconnd matrixs.

Usage

tmatrixMultiply(X,Y)

Arguments

X

A numeric Matrix.

Y

A numeric Matrix.

Value

Returns the tropical product of X and Y

Details

If number of columns of first matrix is not equal to the number of rows of second matrix or any one matrix is not a numeric matrix then this functions generates an error. If mxn is first matrix and axb is a second matrix then nxa will be the resultant matrix.

Examples

Run this code
# NOT RUN {
X<-matrix(c(2,3,5,7),ncol=2,nrow=2)
Y<-matrix(c(6,3,1,9),ncol=2, nrow=2)
tmatrixMultiply(X,Y)
# }

Run the code above in your browser using DataLab