how to create a large table to assign multiple row vector of indices and how to remove those rows which have common indices ?

6 views (last 30 days)
I need to build a table which is combinatorially increasing with the number of columns and the number of indices of measurements (where each index is a row vector). I can use nchoosek method to build this table, but due to large combination of indices (contained in row vectors) with no. of columns, the Matlab stopped due to memory owerflow. In addition, i need to remove those rows which have common indices contained within vector.
Suppose, T=9 (T = 1:9 columns); m=length(M) =9 (i.e., the length of M is also 9 but each element of M is a row vector of different size and which can contain common elements which that of included in other vector of M). For example: M={2,3,2,2,2,2,3,2,2}; where each '2' of this vector is a size of row vector and each '3' is size of row vector. From vector M, we can say there are 20 indices that need to be assign to each column using cartesion product method such that no element can repeat in each row. for example Cartesian product of {a, b, c} × {d, e, f} = {(a, d), (a, e), (a, f), (b, d), (b, e), (b, f), (c, d), (c, e), (c, f)}.
in my question cartesion product of : {0,6}×{0,6,7}x{0,6}x{0,6}x{0,6}x{0,6}x{0,6,7}x{0,6}x{0,6} need to be assigne to each column such that no element in row of table is repeat.
Thanks in advance

Answers (1)

Rajesh Balagam
Rajesh Balagam on 16 Oct 2017

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!