Power set: Difference between revisions

Content deleted Content added
m →‎{{header|MATLAB}}: Fixed a typo and changed a variable name so it doesn't conflict with any MATLAB keywords
m →‎{{header|MATLAB}}: Messed up the powerset preallocation, fixed it.
Line 785:
<lang MATLAB>function pset = powerset(theSet)
 
pset = {zeroscell(size(theSet))}; %Preallocate memory
 
%Generate all numbers from 0 to 2^(num elements of the set)-1