I have two matrices as follows
—————————————–
40 40 40 4041 41 41 4142 42 42 4243 44 43 4443 45 44 4444 48 45 4945 50 49 5150 51 51 5251 52 52 5352 53 53 54
——————————————
1282 1687 2501 1466870 929 644 1141345 103 736 133765 7484 1434 32672796 461 7021 21434689 212 363 241549 320 343 218219 761 415 249187 316 684 86885 309 271 395----------------------------------------
Each column and row of the first matrix corresponds to the second matrix
I would like to generate a matrix as follows
40 1282 1687 2501 146641 870 929 644 114142 345 103 736 13343 2796+765 0 1434 044 4689 7484 7021 3267+214345 549 461 363 046 0 0 0 047 0 0 0 048 0 212 0 049 0 0 343 24150 219 320 0 051 189 761 415 21852 85 316 684 24953 0 309 271 86854 0 0 0 395
As it can be seen , the first matrix was merged and one column which present all the data of the first matrix is appeared. each row and column of the second matrix corresponds to the first matrix and those that had similar values are sum and those values that do not exist a zero will be replaced.
Best Answer