- Scilab Online Help
- Elementary Functions
- Discrete mathematics
- Floating point
- Integer representation
- Trigonometry
- abs
- amell
- and
- &
- binomial
- bitand
- bitor
- bloc2exp
- bloc2ss
- cat
- cell2mat
- cellstr
- char
- cumprod
- cumsum
- delip
- diag
- diff
- dsearch
- exp
- eye
- flipdim
- gsort
- imag
- imult
- ind2sub
- intersect
- inttrap
- isdef
- isempty
- isequal
- isequalbitwise
- isreal
- isvector
- kron
- lex_sort
- linspace
- log
- log10
- log1p
- log2
- logm
- logspace
- lstsize
- max
- meshgrid
- min
- modulo
- ndgrid
- ndims
- nextpow2
- norm
- ones
- or
- |
- pen2ea
- permute
- pertrans
- prod
- rand
- real
- resize_matrix
- setdiff
- sign
- signm
- size
- solve
- sqrt
- sqrtm
- squarewave
- ssrand
- sub2ind
- sum
- sysconv
- sysdiag
- syslin
- toeplitz
- trfmod
- trianfml
- tril
- trisolve
- triu
- typeof
- union
- unique
- vectorfind
- zeros
Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function
max
maximum
Calling Sequence
[m [,k]]=max(A) [m [,k]]=max(A,'c') [m [,k]]=max(A,'r') [m [,k]]=max(A,'m') [m [,k]]=max(A1,A2,...,An) [m [,k]]=max(list(A1,A2,...,An))
Arguments
- A
real vector or matrix.
- A1,...,An
a set of real vectors or matrices, all of the same size or scalar.
Description
For A
, a real vector or matrix,
max(A)
is the largest element A
.
[m,k]=max(A)
gives in addition the index of the
maximum. A second argument of type string 'r'
or
'c'
can be used : 'r'
is used to get
a row vector m
such that m(j)
contains the maximum of the j
th column of A
(A(:,j)
), k(j)
gives the row indice
which contain the maximum for column j
.
'c'
is used for the dual operation on the rows of
A
. 'm'
is used for compatibility
with Matlab.
m=max(A1,A2,...,An)
, where all the
Aj
are matrices of the same sizes,returns a vector or a
matrix m
of size size(m)=size(A1)
such that m(i)= max( Aj(i)), j=1,...,n
.
[m,k]=max(A1,A2,...,An)
gives in addition the vector or
matrix k
. for a fixed i
,
k(i)
is the number of the first
Aj(i)
achieving the maximum.
[m,k]=max(list(A1,...,An))
is an equivalent
syntax of [m,k]=max(A1,A2,...,An)
Examples
<< lstsize | Elementary Functions | meshgrid >> |