Skip to main content
shorten code
Source Link
AsukaMinato
  • 10.4k
  • 1
  • 17
  • 44

you can flatten then MapThread

{{{a,b,c}, {e,f,g}}, {{h,i,j}, {k,l,m}}} //
Flatten[#,1]& //
MapThread[Plus,#]&MapThread[Plus]

(* {a + e + h + k, b + f + i + l, c + g + j + m} *)

you can flatten then MapThread

{{{a,b,c}, {e,f,g}}, {{h,i,j}, {k,l,m}}} //
Flatten[#,1]& //
MapThread[Plus,#]&

(* {a + e + h + k, b + f + i + l, c + g + j + m} *)

you can flatten then MapThread

{{{a,b,c}, {e,f,g}}, {{h,i,j}, {k,l,m}}} //
Flatten[#,1]& //
MapThread[Plus]

(* {a + e + h + k, b + f + i + l, c + g + j + m} *)

Source Link
AsukaMinato
  • 10.4k
  • 1
  • 17
  • 44

you can flatten then MapThread

{{{a,b,c}, {e,f,g}}, {{h,i,j}, {k,l,m}}} //
Flatten[#,1]& //
MapThread[Plus,#]&

(* {a + e + h + k, b + f + i + l, c + g + j + m} *)