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) → voidParameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
id | string | Yes | — | Matrix ID. |
rows | int | Yes | — | New rows. |
cols | int | Yes | — | New cols. |
Returns
voidExample
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.