Anonymous user
Power set: Difference between revisions
m
→{{header|MATLAB}}: Fixed one more problem that I forgot to delete.
m (→{{header|MATLAB}}: Messed up the powerset preallocation, fixed it.) |
m (→{{header|MATLAB}}: Fixed one more problem that I forgot to delete.) |
||
Line 780:
Sets are not an explicit data type in MATLAB, but cell arrays can be used for the same purpose. In fact, cell arrays have the benefit of containing any kind of data structure. So, this powerset function will work on a set of any type of data structure, without the need to overload any operators.
<lang MATLAB>function pset = powerset(theSet)
|