Skip to content
AlertaChartAlertaScript / docs
AlertaScript / alerta.matrix.submatrix
On this pageSignatureParametersReturnsExample

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

NameTypeRequiredDefaultDescription
idstringYes—Matrix ID.
fromRowintNo—Start row (inclusive). Default: 0.
toRowintNo—End row (exclusive). Default: the row count.
fromColintNo—Start col (inclusive). Default: 0.
toColintNo—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.

AlertaScript

No results found.

Search by name, alias, or keyword.