matrix.is_antidiagonal() - Pine Script Function
matrix.is_antidiagonal()
Section titled “matrix.is_antidiagonal()”Overview
Section titled “Overview”The function determines if the matrix is anti-diagonal (all elements outside the secondary diagonal are zero).
Syntax
Section titled “Syntax”matrix.is_antidiagonal(id) → series boolParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| id | matrix<int/float> | Matrix object to test. |
Returns
Section titled “Returns”Returns true if the id matrix is anti-diagonal, false otherwise.
Remarks
Section titled “Remarks”- Returns false with non-square matrices.