Table Of Contents

is_sorted

Version:
    Last Modified: March 15, 2017

    Determines whether the input elements are in increasing order.

    Syntax

    c = is_sorted(a)
    c = is_sorted(a, 'rows')
    Legacy name: issorted

    Inputs

    a

    Vector or matrix of real values, string or string vector.

    'rows'

    Determines how to check the sorting of a. You must specify 'rows' when a is a matrix.

    Outputs

    c

    1 if the elements of a or the rows or columns of matrix a are in increasing order. Otherwise, is_sorted returns 0. c is a Boolean.

    A = [1, 2, 3, 5, 4];
    C = is_sorted(A)

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: This product does not support FPGA devices


    Recently Viewed Topics