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

Matrices / Reference

alerta.matrix.reshape

TradingView-compatible spelling: matrix.reshape, runs without warnings

Gives the matrix a new shape in place, keeping its elements in order (rows × cols must equal the element count).

alerta.matrix.reshape(id, rows, cols) → void

Parameters

NameTypeRequiredDefaultDescription
idstringYes—Matrix ID.
rowsintYes—New rows.
colsintYes—New cols.

Returns

void

Example

alerta.matrix.reshape
m = matrix.new(2, 2, 1)matrix.reshape(m, 1, 4)plot(matrix.columns(m), { title: "reshape cols", 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.