I have the following matrix:
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
[1,] 0 0 0 0 0 0 0 0 0 0
[2,] 0 0 0 0 0 0 0 0 0 0
[3,] 0 0 0 0 0 0 0 0 0 0
[4,] 1 1 1 1 0 0 0 0 0 0
[5,] 1 1 1 1 0 0 0 0 0 0
[6,] 1 1 1 1 0 0 0 0 0 0
[7,] 1 1 1 1 0 0 0 0 0 0
[8,] 1 1 1 1 0 0 0 0 0 0
[9,] 1 1 1 1 0 0 0 0 0 0
[10,] 1 1 1 1 0 0 0 0 0 0
and I would like to know how to extract the 7x4 dimension of the submatrix with elements equal to 1.