I have a series of 5x5 matrices (20 total) and I need to create a global matrix that sums the 4x4 sections of the matrices based on the corresponding values of the first row and column. Refer image below.
https://i.stack.imgur.com/xUAEL.png
The boxed 4x4 matrices are the elements that I need to sum.
The global matrix will be the sum of all of the corresponding values that match the first row and column. For example, in the image above, the values from k1 and k2 that get added together will be the cells corresponding to 10,10 (top left for both 4x4 matrices), which is 0.000 + 0.010. The matrices k3 and k4 don't have a 10,10 cell, so no values will be added from these matrices.
So the global matrix will look similar to the below image (note the matrix is incomplete).
https://i.s
mage description here]3]3
If possible, I'd like to write a macro that can do this in order to save me having to do it manually. I've tried a couple of match functions but can't seem to get anywhere with it given my novice coding ability.
Any suggestions would be greatly appreciated.
