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

« back to all changes in this revision

Viewing changes to man/elementary/max.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 max G "April 1993" "Scilab Group" "Scilab Function"
2
 
.so ../sci.an
3
 
.SH NAME
4
 
max - maximum
5
 
.SH CALLING SEQUENCE
6
 
.nf
7
 
[m [,k]]=max(A)
8
 
[m [,k]]=max(A,'c') or [m [,k]]=max(A,'r')
9
 
[m [,k]]=max(A1,A2,...,An)
10
 
[m [,k]]=max(list(A1,A2,...,An))
11
 
.fi
12
 
.SH PARAMETERS
13
 
.TP 10
14
 
A
15
 
: real vector or matrix.
16
 
.TP 10
17
 
A1,...,An
18
 
: a set of real vectors or matrices, all of the same size or scalar.
19
 
.SH DESCRIPTION
20
 
For \fVA\fR, a real  vector or matrix, \fVmax(A)\fR 
21
 
is the largest element 
22
 
\fVA\fR. \fV[m,k]=max(A)\fR gives in addition the index of the maximum.
23
 
A second argument of type string \fV'r'\fR or \fV'c'\fR can be used : \fV'r'\fR
24
 
is used to get a row vector \fVm\fR such that \fVm(j)\fR contains the 
25
 
maximum of the \fVj\fR th column of A (\fVA(:,j)\fR), \fVk(j)\fR gives the row 
26
 
indice which contain the maximum for column \fVj\fR. \fV'c'\fR is used for the dual operation on the rows of \fVA\fR.
27
 
 
28
 
\fVm=max(A1,A2,...,An)\fR, where all the \fVAj\fR are matrices of the same 
29
 
sizes,returns a vector or a matrix \fVm\fR of size \fVsize(m)=size(A1)\fR
30
 
such that \fVm(i)= max( Aj(i)), j=1,...,n\fR. \fV[m,k]=max(A1,A2,...,An)\fR 
31
 
gives in addition the vector or matrix \fVk\fR. for a fixed \fVi\fR,
32
 
\fVk(i)\fR is the number of the first \fVAj(i)\fR achieving the maximum.
33
 
 
34
 
\fV[m,k]=max(list(A1,...,An))\fR is an equivalent syntax of 
35
 
\fV[m,k]=max(A1,A2,...,An)\fR
36
 
.SH EXAMPLE
37
 
.nf
38
 
[m,n]=max([1,3,1])
39
 
[m,n]=max([3,1,1],[1,3,1],[1,1,3])
40
 
[m,n]=max([3,-2,1],1)
41
 
[m,n]=max(list([3,1,1],[1,3,1],[1,1,3]))
42
 
[m,n]=max(list(1,3,1))
43
 
.fi
44
 
.SH SEE ALSO
45
 
sort, find, mini