ranVal= sample(1:10,100,replace =T) #creating 10X10 with random values M=matrix(ranVal,nrow=10) print (M)