isElement(set,element)

Determines if a given element exists within a set.


Syntax

o_isElement(set,element)
a: array any - input set
element: scalar any - element to look for in the set
return: scalar int - "1" if element is in set, "0" if not

Usage

Use this to determine if a given element exists within a set.

Location

menu: veeos ==> Math ==> Sets ==> isElement

library: mathLib

Example

o_isElement( [2   3  4  3  5  5  3  1] , 6) returns 0 ("false")

o_isElement( [2   3  4  3  5  5  3  1] , 2) returns 1 ("true")

Notes

When dealing with sets it is often useful to know if an element exists within a given set. A typical case is when looking for a specific test result in an array of results, based on a specific detail like an operator name.

Reference

Dependencies

Supported On

VEE 7.0+, all platforms

See Also

setAND, setComplement, setOR, setXOR, unique


© 2015-2025. All Rights Reserved. Stan Bischof (stan@worldbadminton.com). Last updated 13 February 2024 08:50.