Table Of Contents

logical

Version:
    Last Modified: January 9, 2017

    Converts numeric values to Boolean values.

    Syntax

    c = logical(a)

    Inputs

    a

    Scalar or array of any dimension of integer or real values.

    Outputs

    c

    Equivalent Boolean values. MathScript converts non-zero elements to Boolean 1, or TRUE, and converts zero elements to Boolean 0, or FALSE. Complex numbers and NaN result in errors. c is a Boolean array of the same size as a.

    A = [0, 1, 1; 2, 0, 1; 5, 0, 89]
    C = logical(A)

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: Not supported


    Recently Viewed Topics