I appreciate all you help. This is only for instructional purpose: A = matrix(c(0,1,1,-2,-3,1,2,-1,0,2,2,4,1,-3,-2,1,-4,-7,-1,-19), ncol=5, byrow=T) B =matrix(sample(c(0,1,1,-2,-3,1,2,-1,0,2,2,4,1,-3,-2,1,-4,-7,-1,-19),), ncol=5, byrow=T)
Which print func( A, B, A+B) can print the resulting matrices A and B and A+B in the following format? [,1] [,2] [,3] [,4] [,5] [,1] [,2] [,3] [,4] [,5] [,1] [,2] [,3] [,4] [,5] [1,] 0 1 1 -2 -3 [1,] 2 -1 0 2 1 [1,] 2 0 1 0 -2 [2,] 1 2 -1 0 2 + [2,] 1 -4 2 -2 -2 = [2,] 2 -2 1 -2 0 [3,] 2 4 1 -3 -2 [3,] -3 1 -7 1 -1 [3,] -1 5 -6 -2 -3 [4,] 1 -4 -7 -1 -19 [4,] -3 0 4 -19 1 [4,] -2 -4 -3 -20 -18 -- View this message in context: http://r.789695.n4.nabble.com/How-to-define-new-matrix-based-on-an-elementary-row-operation-in-a-single-step-tp2341768p2536409.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.