Home all possible combinations of a set in Matlab
 I'm trying to find all possible combinations of a set but the order of the elements are also important for my problem. For example for the set set={A, B, C}, the possible subsets are subsets={A},{B},{C},{A,B},{A,C},{B,A},{B,C},{C,A},{C,B},{A,B,C},{A,C,B},{B,A,C},{B,C,A},{C,A,B},{C,B,A}. Are there any Matlab function to find that? Thanks in advance.