作业帮 > 英语 > 作业

matlab矩阵元素位置怎么返回?

来源:学生作业帮 编辑:作业帮 分类:英语作业 时间:2024/05/09 20:56:12
matlab矩阵元素位置怎么返回?
FIND Find indices of nonzero elements.
I = FIND(X) returns the indices of the vector X that are
non-zero.For example,I = FIND(A>100),returns the indices
of A where A is greater than 100.See RELOP.
[I,J] = FIND(X) returns the row and column indices of
the nonzero entries in the matrix X.This is often used
with sparse matrices.
[I,J,V] = FIND(X) also returns a vector containing the
nonzero entries in X.Note that find(X) and find(X~=0)
will produce the same I and J,but the latter will produce
a V with all 1's.
See also SPARSE,IND2SUB.