antidiagnol {HadamardR} | R Documentation |
antidiagnol performs the creation of Back diagnol matrix.
antidiagnol(n)
n |
integer |
An anti-diagonal matrix is a square matrix where all the entries are zero except those on the diagonal going from the lower left corner to the upper right corner entries are equal to 1.
In the first row, the last column will be 1 and all other entries are 0.
In second row, last but one column is 1 and others are 0 and so on.
Antidiagnol matrix of order n.
antidiagnol(4)
#0 0 0 1
#0 0 1 0
#0 1 0 0
#1 0 0 0