Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Give the totals of the entries on the rising diagonals of a square matrix
ResourceFunction["AntidiagonalTotals"][mat] gives the first n totals along the antidiagonals of the n×n matrix mat. |
Get the totals for a 3×3 matrix:
In[1]:= |
Out[1]= |
Get the totals for a random matrix:
In[2]:= |
Out[3]= |
In[4]:= |
Out[4]= |
The direction of the antidiagonals:
In[5]:= |
Out[5]= |
AntidiagonalTotals[mat] is equal to AntidiagonalTotals[Transpose[mat]]:
In[6]:= |
Out[6]= |
In[7]:= |
Out[7]= |
In[8]:= |
Out[8]= |
In[9]:= |
Out[9]= |
Pascal’s triangle:
In[10]:= |
Out[10]= |
The Fibonacci sequence:
In[11]:= |
Out[11]= |
In[12]:= |
Out[12]= |
Wolfram Language 11.3 (March 2018) or above
This work is licensed under a Creative Commons Attribution 4.0 International License