powered by
This function returns the scaled matrix 'Y' by a value X .
scaleMatrix(x,y)
A numeric value
A numeric matrix
Returns the scaled matrix y by x
y
x
e.g. [1] [2] [1] 2 3 matrix Y [2] 5 7
x<-5 Now function call to scale matrix Y by 5 [1] [2] [1] 7 8 Resultant matrix [2] 10 12
# NOT RUN { x<-5 y<-matrix(c(2,3,5,7),ncol=2,nrow=2) scaleMatrix(x,y) # }
Run the code above in your browser using DataLab