issorted
Determine if array is sorted.
Syntax
tf = issorted(A)
tf = issorted(A, dim)
tf = issorted(..., direction)
tf = issorted(A, 'rows')
Input argument
A - an nelson's variable (double, single, int8, int16, int32, int64, uint8, uint16, uint32, uint64, logical, char, string, cell).
dim - Dimension to operate along: positive integer scalar.
direction - Sorting direction: 'ascend' (default) or 'descend'.
'rows' - returns true when the elements of the first column of a matrix are sorted.
Output argument
tf - a logical: true if array is sorted.
Description
tf = issorted(A) returns true if the elements of A are sorted in ascending order, and false otherwise.
Example
See also
sort.
History
Version
Description
1.0.0
initial version
Author
Allan CORNET
Last updated