File: find.cat

package info (click to toggle)
scilab 2.6-4
  • links: PTS
  • area: non-free
  • in suites: woody
  • size: 54,632 kB
  • ctags: 40,267
  • sloc: ansic: 267,851; fortran: 166,549; sh: 10,005; makefile: 4,119; tcl: 1,070; cpp: 233; csh: 143; asm: 135; perl: 130; java: 39
file content (35 lines) | stat: -rw-r--r-- 930 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
find             Scilab Group             Scilab Function              find
NAME
   find - find indices of  boolean vector or matrix true elements
  
CALLING SEQUENCE
 [ii]=find(x)
 [ir,ic]=find(x)
PARAMETERS
 x    : a boolean vector or a boolean matrix or a "standard" matrix
      
 ii, ir, ic
       : integer vectors of indices or empty matrices
      
DESCRIPTION
   If x is a boolean matrix,
  
   ii=find(x) returns the vector of indices i for which x(i) is "true". If
  no true element found find returns an empty matrix.
  
   [ir,ic]=find(x) returns two vectors of indices ir (for rows) and ic (for
  columns) such that x(ir(n),ic(n)) is "true". If no true element found
  find returns  empty matrices in ir and ic.
  
   if x is standard matrix find(x) is interpreted as find(x<>0)
  
   find([]) returns []
  
EXAMPLE
 A=rand(1,20);
 w=find(A<0.5);
 A(w)
 w=find(A>100);
SEE ALSO
   boolean, extraction, insertion