code: X=[3] for t=1:length(X) A = partitions([X(t)]) for d=1:length(A) for e=1:length(A{d}) C=A{d}{e} end end end If i run the code,it executes and gives the result. C = 1 2 3 C = 1 2 C = 3 C = 1 3 C = 2 C = 1 C = 2 3 C = 1 C = 2 C = 3 But i want to have C should not display more than 2 numbers,which means C should display C = 1 2 C = 3 C = 1 3 C = 2 C = 1 C = 2 3 C = 1 C = 2 C = 3by not considering C=1 2 3.Could anyone please help me on this.
MATLAB: Could anyone help me to solve the issue in the following code
display
Related Question
- Could anyone help me how to select the partitions in a random manner.
- Could anyone help me to overcome the error in the following code
- All possible combinations (subgroups vary in size) of elements in a vector
- Fill an array in a for loop, with change of dimension
- Could anyone help me to solve the issue.
Best Answer