Hi everybody,
Below there are all the information needed to understand my problem. I tried to find something similar in the forum, but I couldn't.
M(1 to R,1 to C): matrix with R rows and C columns [element known]
M(i,j): elements of the matrix M in position i(row)-j(column) [element known]
n<r [element="" known]
N(1 to n, 1 to C) [element unknown]
N is made of all the rows of the matrix M that have in the column i a specific value.
How is it possible to create such matrix?
Below there is an example of matrix M and N: the specific value in the column 2 (i) is C
</r>
[TABLE="width: 284"]
<colgroup><col><col><col><col></colgroup><tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]M[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]0.1[/TD]
[TD]C[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]0.2[/TD]
[TD]A[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]0.1[/TD]
[TD]C[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]0.4[/TD]
[TD]C[/TD]
[TD]20[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]0.5[/TD]
[TD]B[/TD]
[TD]25[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]0.6[/TD]
[TD]C[/TD]
[TD]30[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]N[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]0.1[/TD]
[TD]C[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]0.1[/TD]
[TD]C[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]0.4[/TD]
[TD]C[/TD]
[TD]20[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]0.6[/TD]
[TD]C[/TD]
[TD]30[/TD]
[/TR]
</tbody>[/TABLE]
<r [element="" known]
Grazie
Scorpione</r>
Below there are all the information needed to understand my problem. I tried to find something similar in the forum, but I couldn't.
M(1 to R,1 to C): matrix with R rows and C columns [element known]
M(i,j): elements of the matrix M in position i(row)-j(column) [element known]
n<r [element="" known]
N(1 to n, 1 to C) [element unknown]
N is made of all the rows of the matrix M that have in the column i a specific value.
How is it possible to create such matrix?
Below there is an example of matrix M and N: the specific value in the column 2 (i) is C
</r>
[TABLE="width: 284"]
<colgroup><col><col><col><col></colgroup><tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]M[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]0.1[/TD]
[TD]C[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]0.2[/TD]
[TD]A[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]0.1[/TD]
[TD]C[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]0.4[/TD]
[TD]C[/TD]
[TD]20[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]0.5[/TD]
[TD]B[/TD]
[TD]25[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]0.6[/TD]
[TD]C[/TD]
[TD]30[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]N[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]0.1[/TD]
[TD]C[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]0.1[/TD]
[TD]C[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]0.4[/TD]
[TD]C[/TD]
[TD]20[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]0.6[/TD]
[TD]C[/TD]
[TD]30[/TD]
[/TR]
</tbody>[/TABLE]
<r [element="" known]
Grazie
Scorpione</r>
Last edited: