Matrices / Reference
alerta.matrix.submatrix
TradingView-compatible spelling: matrix.submatrix, runs without warnings
Returns a sliced submatrix using [from,to) ranges.
alerta.matrix.submatrix(id, fromRow, toRow, fromCol, toCol) → Matrix ID (string)Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
id | string | Yes | — | Matrix ID. |
fromRow | int | No | — | Start row (inclusive). Default: 0. |
toRow | int | No | — | End row (exclusive). Default: the row count. |
fromCol | int | No | — | Start col (inclusive). Default: 0. |
toCol | int | No | — | End col (exclusive). Default: the column count. |
Returns
Matrix ID (string)Example
alerta.matrix.submatrix
m = matrix.new(2, 2, 1)s = matrix.submatrix(m, 0, 1, 0, 2)plot(matrix.elements_count(s), { title: "sub elems", pane: "oscillator" })Names and aliases
Guides and navigation are localized. Built-in reference descriptions and code examples are maintained in English.