MATLAB: All possible sets from vector

MATLABpermutationssets

I have a vector x = 1:n and I need to compute all sets from it. So for example x = [1 2 3 4] should produce:
[1] [2] [3] [4]
[1 2] [3 4]
[1 2] [3] [4]
[1 3] [2 4]
[1 3] [2] [4]
[1 4] [2 3]
[1 4] [2] [3]
[2 3] [1] [4]
[2 4] [1] [3]
[3 4] [1] [2]
[1 2 3] [4]
[1 2 4] [3]
[1 3 4] [2]
[2 3 4] [1]
[1 2 3 4]