英文:
How can I create these matrices?
问题
我有一个表格,行表示产品,列表示特征。
我需要确定彼此不同的产品。
我将为每个产品创建一个矩阵,将其与所有其他产品进行比较;例如,在针对产品1的表格中,第一行将与产品2相关联,如果特征与产品1不同,将写入值1;下一行对应产品3,依此类推。
因此,如果我有10个产品,我将需要10个具有各自9行的矩阵。
我该如何做呢?感谢您的帮助。
英文:
I have a table with products in rows and characteristics in columns.
I need to determine the products that are different from each other.
I would create a matrix for each product, comparing it with all the other products; for example, in the table for product1, the first row will be related to the product 2, and if the characteristic is different from product 1, value 1 will be written; the next row for product 3 and so on.
So, if I have 10 products, I'll need 10 matrices with 9 rows each.
How can I do this? Thank you for your help.
专注分享java语言的经验与见解,让所有开发者获益!
评论