~ubuntu-branches/ubuntu/hoary/scilab/hoary

« back to all changes in this revision

Viewing changes to man/programming/find.man

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2005-01-09 22:58:21 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050109225821-473xr8vhgugxxx5j
Tags: 3.0-12
changed configure.in to build scilab's own malloc.o, closes: #255869

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.TH find 1 "April 1993" "Scilab Group" "Scilab Function"
2
 
.so ../sci.an
3
 
.SH NAME
4
 
find - find indices of  boolean vector or matrix true elements
5
 
.SH CALLING SEQUENCE
6
 
.nf
7
 
[ii]=find(x)
8
 
[ir,ic]=find(x)
9
 
.fi
10
 
.SH PARAMETERS
11
 
.TP
12
 
13
 
: a boolean vector or a boolean matrix or a "standard" matrix
14
 
.TP
15
 
ii, ir, ic
16
 
: integer vectors of indices or empty matrices
17
 
.SH DESCRIPTION
18
 
If \fVx\fR is a boolean matrix,
19
 
.LP
20
 
\fVii=find(x)\fR returns the vector
21
 
of indices \fVi\fR for which \fVx(i)\fR is "true". If no true element
22
 
found find returns an empty matrix.
23
 
.LP
24
 
\fV[ir,ic]=find(x)\fR returns two vectors of indices \fVir\fR (for rows) and \fVic\fR (for columns)
25
 
such that \fVx(ir(n),ic(n))\fR is "true". If no true element
26
 
found find returns  empty matrices in \fVir\fR and \fVic\fR.
27
 
.LP
28
 
if \fVx\fR is standard matrix \fVfind(x)\fR is interpreted as
29
 
\fVfind(x<>0)\fR
30
 
.LP
31
 
\fVfind([])\fR returns \fV[]\fR
32
 
.SH EXAMPLE
33
 
.nf
34
 
A=rand(1,20);
35
 
w=find(A<0.5);
36
 
A(w)
37
 
w=find(A>100);
38
 
.fi
39
 
.SH SEE ALSO
40
 
boolean, extraction, insertion
41