Owning Class: membership
Requires: MathScript RT Module
c = is_sorted(a)
c = is_sorted(a, b)
Legacy Name: issorted
Determines whether the input elements are in increasing order.
| Name | Description | ||||
|---|---|---|---|---|---|
| a | A vector or matrix. | ||||
| b | Determines how to check the sorting of a. You must specify b when a is a matrix. b is a string that accepts the following values.
|
| Name | Description |
|---|---|
| c | Returns 1 if the elements of vector a or the rows or columns of matrix a are in increasing order. Otherwise, this function returns 0. c is a Boolean. |
A = [1, 2, 3, 5, 4]
C = is_sorted(A)