FIND

 

 Find indices of the non-zero elements.

  I21KTGXR = FIND(X) returns the indices of the vector X that are

  non-zero. For example, I21KTGXR = FIND(A>100), returns the indices

  of A where A is greater than 100. See RELOP2HFK0Q8.

 

 

  [I21KTGXR,J21KTHXR] = FIND(X) returns the row and column indices of

  the nonzero entries in the matrix X.  This is often used

  with sparse matrices.

 

 

  [I21KTGXR,J21KTHXR,V] = FIND(X) also returns a column vector of the

  nonzero entries in X.  Note that find(X) and find(X~=0)

  will produce the same I21KTGXR and J21KTHXR, but the latter will produce

  a V with all 1's.