If you have an m-dimensional tensor A, how can you get all entries in a vector V that are in the lower simplex of A? The order in the output vector V does not matter to me. The matrix A is quadratic, so it has the same length in each dimension.
For 2D I want to get V from A like this:
A=[1 4 7;
2 5 8;
3 6 9];
For 3D the resulting V should look like this:
V=[1 2 3 5 6 9 11 12 15 21];
The dimension of the Tensor A is really arbitrary.
Edit (thanks to the accepted answer):
Actually for my problem it is even better when the simplex lies in the origin of the matrix (the indices of each dimension are 0). I just noticed this, thanks to the accepted answer. The modified version of the answer than would simply be: