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

1 次查看(过去 30 天)
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 ?

采纳的回答

Steven Lord
Steven Lord 2016-9-29
Use the diag function.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrices and Arrays 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by