Hello, I looked for this problem but I couldn't find any convenient solution. Assume that I have k matrices whose dimensions are m(1)xn, m(2)xn, … m(k)xn. I need all the possible sums of rows of these k matrices.
For example, let us have 3 different matrices.
A = 1 0 2 1 2 4 1 3 0 1 3 2 B = 1 3 0 5C = 2 1 3 0 1 4 0 3
Then the result should be the following.
Result = 4 4 5 6 ( A(1,:) + B(1,:) + C(1,:) ) 3 7 2 8 ( A(1,:) + B(1,:) + C(2,:) ) 5 8 4 8 ( A(2,:) + B(1,:) + C(1,:) ) 4 11 1 10 ( A(2,:) + B(1,:) + C(2,:) ) 3 5 6 7 ( A(3,:) + B(1,:) + C(1,:) ) 2 8 3 9 ( A(3,:) + B(1,:) + C(2,:) )
I hope that I could explain my problem. If there is an ambigous part, please ask me to fix your confusion.
Thanks for your efforts.
Best Answer