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

Matrices / Reference

alerta.matrix.is_stochastic

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

Returns true when all rows sum to 1 and elements are non-negative.

alerta.matrix.is_stochastic(id) → bool

Parameters

NameTypeRequiredDefaultDescription
idstringYes—Matrix ID.

Returns

bool

Example

alerta.matrix.is_stochastic
m = matrix.new(2, 2, 0.5)plot(matrix.is_stochastic(m) ? 1 : 0, { title: "stoch", 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.