- 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.
However, this page did not exist in the previous stable version.
lex_sort
lexicographic matrix rows sorting
Calling Sequence
[N, [k]]=lex_sort(M [,sel] [,'unique'])
Arguments
- M
real matrix
- N
real matrix
- k
column vector of integers
Description
the lex_sort
function is now obsolete. It can be
replaced by functions gsort and unique.
N=lex_sort(M)
sorts the rows (as a group) of the
matrix M
in ascending order. If required the output
argument k
contains the ordering:
[N,k]=lex_sort(M)
returns k
such as
N
is uequal to M(k,:)
.
N=lex_sort(M,sel [,'unique'])
produces the same
result as the following sequence of instructions:
[N,k]=lex_sort(M(:,sel) [,'unique']); N=M(k,:)
The 'unique'
flag has to be given if one wants to
retain only unique rows in the result. Note that
lex_sort(M,sel,'unique')
retains only rows such that
M(:,sel) are unique.
<< kron | Elementary Functions | linspace >> |