RosettaCodeData/Task/Power-set/MATLAB/power-set-3.m

6 lines
135 B
Mathematica
Raw Permalink Normal View History

2013-04-10 23:57:08 -07:00
powerset({{1,2},3})
ans =
{1x0 cell} {1x1 cell} {1x1 cell} {1x2 cell} %This is the same as { {},{{1,2}},{3},{{1,2},3} }