energy
Builtin index · Signal processing
result = energy(x)
Input: x · Output: result
What it is
x: a length-N vector or Signal.
Overloads
One call shape — this function is not overloaded.
| Code | Input | Output | Description |
result = energy(x) | x vector or Signalnot documented yet | result number | Returns a single number, sum(x.^2) — total signal energy. See tkeo for a per-sample instantaneous estimate instead. |
Examples
From the documentation, and run by the build -- the output and the figure below are what the engine actually produced. Simplest first.
e = energy(signal)
instant_energy = tkeo(signal) # length(signal) - 2 (needs a neighbor each side)
from numerics-dsp
How it works
energy(x) — total signal energy, sum(x.^2). See tkeo for a per-sample instantaneous estimate instead.
From the note above this builtin in the interpreter, where the reasoning was written down as it was built.