is_sorted

Determine if the vector is sorted. If the argument is that the matrix is determined,than the matrix rows or columns are sorted.

Arguments

  1. Input vector or matrix, double or complex values.
  2. String 'row' or 'col'.
  3. String 'a' or 'd', 'a' for ascending and 'd' for descending order

Output

Boolean

Examples

is_sorted