Define a set using function

Any function f can act like a set. If the logical value of f(x) is true, then x is considered a member of f, otherwise it is not. For example, the set of all the (floating point) numbers between 0 and 1 can be defined by
>> S = x -> (x >= 0 && x <= 1)
>> 0.5 (- S
     1
>> 1.5 (- S
     0



oz 2009-12-22