Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- list = {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.994429, 0.980929, 0.971825,
- 0.967241, 0.967241, 0.971825, 0.980929, 0.994429, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0.998888, 0.971825,
- 0.948683, 0.929755, 0.915302, 0.905539, 0.900617, 0.900617,
- 0.905539, 0.915302, 0.929755, 0.948683, 0.971825, 0.998888, 0, 0, 0,
- 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0.971825, 0.939267, 0.910433,
- 0.885689, 0.865384, 0.849837, 0.839312, 0.834, 0.834, 0.839312,
- 0.849837, 0.865384, 0.885689, 0.910433, 0.939267, 0.971825, 0, 0, 0,
- 0, 0, 0, 0}}
- list = Partition[Flatten[list], 3]
- Total[Partition[list, {3, 3}], {3, 4}]
- {{0, 0, 2.90998, 6.506198, 8.164602, 8.164602, 6.506198, 2.90998, 0, 0}}
- array = Transpose /@ ArrayReshape[Transpose@list, {10, 3, 3}];
- MatrixForm /@ array
- Total /@ Flatten /@ array
- Total /@ Flatten /@ ArrayReshape[Transpose@list, {10, 3, 3}]
- BlockMap[Total[#, 2]&, list, {3, 3}]
- Partition[list, {3, 3}, {3, 3}, None, {}, Plus]
Add Comment
Please, Sign In to add comment