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

学习 时间:2026-04-06 16:22:05 阅读:4921
matlab矩阵元素位置怎么返回?

最佳回答

鳗鱼紫菜

靓丽的煎蛋

2026-04-06 16:22:05

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。

最新回答共有2条回答

  • 高贵的樱桃
    回复
    2026-04-06 16:22:05

    FIND Find indices of nonzero elements。I = FIND(X) returns the indices of the vector X that arenon-zero。For example,I = FIND(A>100),returns the indicesof A where A is greater than 100。See RELOP。[I,J] = FIND(X) returns the row and column indices ofthe nonzero entries in the matrix X。This is often usedwith sparse matrices。[I,J,V] = FIND(X) also returns a vector containing thenonzero entries in X。Note that find(X) and find(X~=0)will produce the same I and J,but the latter will producea V with all 1's。See also SPARSE,IND2SUB。

上一篇 假设所有的自然数排列起来如下所表示,2011应排在哪个字母下面?A B C D 1 2 3 4 8 7 6 5 9 10

下一篇 为什么我做什么事都不能坚持?没有恒心和毅力,想法总是在变?