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 36 37 38 39 40 41 42 43 44 45 46
|
.TH maxi G "April 1993" "Scilab Group" "Scilab Function"
.so ../sci.an
.SH NAME
maxi - maximum
.SH CALLING SEQUENCE
.nf
[m [,k]]=maxi(A)
[m [,k]]=maxi(A,'c') or [m [,k]]=maxi(A,'r')
[m [,k]]=maxi(A1,A2,...,An)
[m [,k]]=maxi(list(A1,A2,...,An))
.fi
.SH PARAMETERS
.TP 10
A
: real vector or matrix.
.TP 10
A1,...,An
: a set of real vectors or matrices, all of the same size or scalar.
.SH DESCRIPTION
For \fVA\fR, a real vector or matrix, \fVmaxi(A)\fR
is the largest element
\fVA\fR. \fV[m,k]=maxi(A)\fR gives in addition the index of the maximum.
A second argument of type string \fV'r'\fR or \fV'c'\fR can be used : \fV'r'\fR
is used to get a row vector \fVm\fR such that \fVm(j)\fR contains the
maximum of the \fVj\fR th column of A (\fVA(:,j)\fR), \fVk(j)\fR gives the row
indice which contain the maximum for column \fVj\fR. \fV'c'\fR is used for the dual operation on the rows of \fVA\fR.
\fVm=maxi(A1,A2,...,An)\fR, where all the \fVAj\fR are matrices of the same
sizes,returns a vector or a matrix \fVm\fR of size \fVsize(m)=size(A1)\fR
such that \fVm(i)= max( Aj(i)), j=1,...,n\fR. \fV[m,k]=maxi(A1,A2,...,An)\fR
gives in addition the vector or matrix \fVk\fR. for a fixed \fVi\fR,
\fVk(i)\fR is the number of the first \fVAj(i)\fR achieving the maximum.
\fV[m,k]=maxi(list(A1,...,An))\fR is an equivalent syntax of
\fV[m,k]=maxi(A1,A2,...,An)\fR
.SH EXAMPLE
.nf
[m,n]=maxi([1,3,1])
[m,n]=maxi([3,1,1],[1,3,1],[1,1,3])
[m,n]=maxi([3,-2,1],1)
[m,n]=maxi(list([3,1,1],[1,3,1],[1,1,3]))
[m,n]=maxi(list(1,3,1))
.fi
.SH SEE ALSO
sort, find, mini
|