Learn R Programming

tropAlgebra (version 0.1.1)

tscale: Tropical Scaling of Matrix Or vector

Description

This function returns the scaled matrix or vector Y by a value x .This function works only if Y is matrix or vector and x is a numeric value.

Usage

tscale(x,y)

Arguments

x

A numeric value.

y

A numeric matrix or a numeric vector.

Value

Returns the scaled Y.

Details

If the given argument x is not a numeric value or argument Y is not a numeric matrix or a numeric vector then this function generates an error.

Examples

Run this code
# NOT RUN {
x<-5
y<-matrix(c(2,3,5,7),ncol=2,nrow=2)
tscale(x,y)
y<-c(1,2,3)
tscale(x,y)
# }

Run the code above in your browser using DataLab