Table Of Contents

is_field

Version:
    Last Modified: March 15, 2017

    Determines whether a structure contains a field with a given fieldname.

    Syntax

    b = is_field(s, fieldname)
    Legacy name: isfield

    Inputs

    s

    Structure or array of structures.

    fieldname

    Name of the field you want to reference within the structure. fieldname is a string.

    Outputs

    b

    1 (True) if fieldname is a field in the structure. Otherwise the function returns 0 (False). b is a Boolean.

    point.x = 3.0;
    point.y = 4.0;
    point.color = 'blue';
    B = is_field(point, 'x')

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: This product does not support FPGA devices


    Recently Viewed Topics