& gt& gtA=
A =
0 0 1 1
1 0 0 1
0 1 1 0
& gt& gt[ i,j ] = find( A == 1)
我=
2
三
1
j =
四
如果是稀疏矩陣:
& gt& gtS =稀疏(A)
S =
(2,1) 1
(3,2) 1
(1,3) 1
(3,3) 1
(1,4) 1
(2,4) 1
& gt& gt[ i,j ] =查找