Navigation

Operators and Keywords

Function List:

C++ API

: powerset (a)
: powerset (a, "rows")

Compute the powerset (all subsets) of the set a.

The set a must be a numerical matrix or a cell array of strings. The output will always be a cell array of either vectors or strings.

With the optional argument "rows", each row of the set a is considered one element of the set. The input must be a 2-D numeric matrix to use this argument.

See also: unique, union, intersect, setdiff, setxor, ismember.

Package: octave