superdiagonal
Represents the superdiagonal in a matrix.
Syntax
-
superdiagonal(A)-
Ais a matrix
-
The returned value is an lvalue.
Description
If A is a matrix, not necessarily square, then superdiagonal(A) represents the superdiagonal in A, that is, the entries A[i, j] where i = j − 1.
Typewise, superdiagonal(A) is a vector.
superdiagonal(A) is an lvalue, so it may be assigned to. If A is a real matrix, then only a real vector can be assigned to it.
Examples
A ≔ ❨❨1, 2, 3❩, ❨5, 1, 2❩, ❨6, 6, 5❩, ❨4, 2, 1❩❩
⎛1 2 3⎞ ⎜5 1 2⎟ ⎜6 6 5⎟ ⎝4 2 1⎠
superdiagonal(A)
⎛2⎞ e⎝2⎠
superdiagonal(A) ≔ ❨4, 9❩
⎛4⎞ e⎝9⎠
A
⎛1 4 3⎞ ⎜5 1 9⎟ ⎜6 6 5⎟ ⎝4 2 1⎠