how to create a large table to assign multiple row vector of indices and how to remove those rows which have common indices ?
1 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(1 个)
Rajesh Balagam
2017-10-16
The second answer in the following stackoverflow page seems relevant.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Other Formats 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!