suppose I have
假设我有
# test case
a<-matrix(rep(c(1,2,3,4,5,6),3),ncol=3)
b<-t(matrix(c(1,3,4)))
a
[,1] [,2] [,3]
[1,] 1 1 1
[2,] 2 2 2
[3,] 3 3 3
[4,] 4 4 4
[5,] 5 5 5
[6,] 6 6 6
b
[,1] [,2] [,3]
[1,] 1 3 4
# test case
a<-matrix(