Hello I am trying to write a function in Matlab that takes a whole set and outputs all possible subsets of a given set.
For example: If I have a set
A = {1,2}
All possible subsets are
B = { {}, {1}, {2}, {1,2} }
I have tried nchoosek
Any ideas? Kinda lost on how I should implement this?