1
.TH max G "April 1993" "Scilab Group" "Scilab Function"
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))
15
: real vector or matrix.
18
: a set of real vectors or matrices, all of the same size or scalar.
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.
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.
34
\fV[m,k]=max(list(A1,...,An))\fR is an equivalent syntax of
35
\fV[m,k]=max(A1,A2,...,An)\fR
39
[m,n]=max([3,1,1],[1,3,1],[1,1,3])
41
[m,n]=max(list([3,1,1],[1,3,1],[1,1,3]))
42
[m,n]=max(list(1,3,1))