I’ve been struggling with one problem. I have a classic matrix in this example 12×4 such as: matrix = Table[i, {i, 12}, {4}]
TableForm@matrix
I need to sum the rows according to the example below.
Total@matrix[[{1, 5, 9}]]
Total@matrix[[{2, 6, 10}]]
Total@matrix[[{3, 7, 11}]
I tried using MapAt, but without any real success so far. I need to make a function out of it, cause later I will be using it for matrix 1036×37. Any tips?