home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-02-21 | 561 b | 26 lines | [TEXT/RLAB] |
- find:
-
- Syntax: find ( A )
-
- Description:
-
- Find returns a matrix that contains the indices of the
- non-zero elements of the input matrix A.
-
- A common usage for find(), is the selection of matrix elements
- that meet certain criteria.
-
- Example:
-
- > a = rand(4,4)
- a =
- matrix columns 1 thru 4
- 0.647 0.665 0.655 0.299
- 0.333 0.0847 0.129 0.265
- 0.0369 0.204 0.91 0.7
- 0.162 0.167 0.112 0.95
- > x = a[ find( a < .1 ) ]
- x =
- matrix columns 1 thru 2
- 0.0369 0.0847
-