I need help please and thanks for looking into this
I have two Matrixes with the same size as A and B. As the following
A = [1, 0, 0; 0, 0, 3; 1, 0, 0];
B = [2, 4, 5; 4, 3, 1; 4, 6, 1];
I would like the sum the columns in B for every row only for the same index in A that has zero. This should be done for every row to get:
1 Comment
Direct link to this comment
https://la.mathworks.com/matlabcentral/answers/510595-summing-the-row-of-a-matrix-that-meet-a-condition-from-another-matrix#comment_809260
Direct link to this comment
https://la.mathworks.com/matlabcentral/answers/510595-summing-the-row-of-a-matrix-that-meet-a-condition-from-another-matrix#comment_809260
Sign in to comment.