.. highlightlang:: us .. _find: find ==== .. index:: find .. us.tag find ENGLISH The :ref:`find` function finds the indices of all matrix elements which do not equal 0. .. function:: rvIndexes = find(rvM) .. us.return **Return Value** *rvIndexes* contains the indices of the elements of *rvM* which are not equal to 0. .. us.params **Parameters** .. uparam:: rvM *rvM* is a real matrix. If all matrix elements are equal to 0 (zero) the function will return 0. .. us.comment **Comment** :ref:`find` is mainly used in conjunction with comparison operators. If *rvM* is a matrix, the function returns the indices of the internal representation of the matrix. .. us.example **Example** :: a = [1, 2, 6, 45, 3, 11] b = find(a >= 6) print a[b] // Output: 6 45 11 a = ["abc", "def", "jkl"] b = find(a != "def") print b // Output: 1 3 print a[b] // Output: abc jkl .. seealso:: :ref:`overview-programming`, :ref:`findfirst` :sub:`id-860771`