subsample SciMax Toolbox subsetp

SciMax Toolbox >> subset

subset

Maxima Function

Calling Sequence

subset (a, f)

Description

Returns the subset of the set a that satisfies the predicate f.

subset returns a set which comprises the elements of a for which f returns anything other than false. subset does not apply is to the return value of f.

subset complains if a is not a literal set.

See also .

Examples:

(%i1) subset ({1, 2, x, x + y, z, x + y + z}, atom);
(%o1)                     {1, 2, x, z}
(%i2) subset ({1, 2, 7, 8, 9, 14}, evenp);
(%o2)                      {2, 8, 14}
subsample SciMax Toolbox subsetp