swapMatrix: Swap Matrices

Description Usage Arguments Details Value Examples

Description

This function interchanges the values of both matrices.This function works only if both matrices are of same size.

Usage

1

Arguments

X

A matrix.

Y

A matrix.

Details

If the size of both matrices are not same, it generates an error. This function swaps the matrices in memory(like pass by reference), it does not return the matrices, but interchanges their values.

Value

Swapped Matrix X and Y.

Examples

1
2
3
x<-matrix(c(2,3,5,7),ncol=2,nrow=2)
y<-matrix(c(6,3,1,9),ncol=2, nrow=2)
swapMatrix(x,y)

tropAlgebra documentation built on May 2, 2019, 7:29 a.m.