我有以下矩阵:
[,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
我想知道如何提取元素等于 1 的子矩阵的 7x4 维度。