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

« back to all changes in this revision

Viewing changes to man/elementary/lex_sort.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 lex_sort 1 "April 1999" "Scilab Group" "Scilab Function"
2
 
.so ../sci.an
3
 
.SH NAME
4
 
lex_sort - lexicographic matrix rows  sorting
5
 
.SH CALLING SEQUENCE
6
 
.nf
7
 
[N, [k]]=lex_sort(M [,sel] [,'unique'])
8
 
 
9
 
.fi
10
 
.SH PARAMETERS
11
 
.TP
12
 
13
 
: real matrix
14
 
.TP
15
 
N
16
 
: real  matrix
17
 
.TP
18
 
k
19
 
: column vector  of integers
20
 
.SH DESCRIPTION
21
 
\fVN=lex_sort(M)\fR sorts the rows (as a group) of the matrix \fVM\fR
22
 
in ascending order. If required the output argument \fVk\fR contains
23
 
the ordering: \fV[N,k]=lex_sort(M)\fR returns \fVk\fR  such as \fVN\fR  is
24
 
uequal to \fVM(k,:)\fR .
25
 
.LP
26
 
\fVN=lex_sort(M,sel [,'unique'])\fR produces the  same result as the
27
 
following sequence of instructions:
28
 
.nf
29
 
[N,k]=lex_sort(M(:,sel) [,'unique']);
30
 
N=M(k,:)
31
 
.fi
32
 
.LP
33
 
The \fV'unique'\fR flag has to be given if one wants to retain only
34
 
unique rows in the result. Note that \fVlex_sort(M,sel,'unique')\fR
35
 
retains only rows such that M(:,sel) are unique.
36
 
 
37
 
.SH EXAMPLE
38
 
.nf
39
 
M=round(2*rand(20,3));
40
 
 
41
 
lex_sort(M)
42
 
lex_sort(M,'unique')
43
 
[N,k]=lex_sort(M,[1 3],'unique')
44
 
 
45
 
.fi
46
 
.SH SEE ALSO
47
 
sort
48