# 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)
Sufyan Memon on 14 Oct 2017
Answered: Rajesh Balagam on 16 Oct 2017
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.

Rajesh Balagam on 16 Oct 2017