x <- matrix(1:4, nrow = 2) x[2,2] <- 1000 x code example
Example: how to write a 10x10 matrix in rstudio
ranVal= sample(1:10,100,replace =T) #creating 10X10 with random values
M=matrix(ranVal,nrow=10)
print (M)
ranVal= sample(1:10,100,replace =T) #creating 10X10 with random values
M=matrix(ranVal,nrow=10)
print (M)