# The mean over each diagonal (or anti-diagonal) of a 2d matrix returned in a vector in matlab

The following Matlab project contains the source code and Matlab examples used for the mean over each diagonal (or anti-diagonal) of a 2d matrix returned in a vector .
Efficient and compact code for taking the mean of each diagonal (or anti-diagonal) in a 2D matrix without using a for-loop.