Sum of array elements at 45° degree oblique dimension in Matlab

1 visualizzazione (ultimi 30 giorni)
Hello everyone!
I need your help!
Can anyone tell me how to find the sums (in red) of magic(3) array elements at 45° degree oblique dimension in Matlab as shown in the following figure ?

Risposta accettata

Steven Lord
Steven Lord il 29 Set 2016
Use the diag function.

Più risposte (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by