MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi test

Learn moreOpportunities for recent engineering grads.

Apply TodayGiven a matrix, return the sum of all the elements across the diagonals.

E.g. A = [1 2 3; 4 5 6; 7 8 9;]

then, sum = 25 as sum of (1, 3, 7, 9,5)

114 correct solutions
111 incorrect solutions

Last solution submitted on Apr 08, 2016

1 player likes this solution

1 Comment

Jean-Marie Sainthillier
on 9 Feb 2014

First time I see this notation.

1 Comment