dwt
Builtin index · Signal processing
result = dwt(x)
Input: x · Output: result
What it is
x is a length-N real vector (N should be even).
Overloads
One call shape — this function is not overloaded.
| Code | Input | Output | Description |
result = dwt(x) | x vectornot documented yet | result matrix | Returns a (2, N/2) matrix — row 0 is the approximation band, row 1 is the detail band (Qu has no multi-return). One level of the orthogonal Haar discrete wavelet transform; only the Haar family is implemented. |
Examples
From the documentation, and run by the build -- the output and the figure below are what the engine actually produced. Simplest first.
D = dwt(x)
approx = D[0, :]
detail = D[1, :]
xr = idwt(D) # reconstructs x exactly
from numerics-dsp
How it works
One level of the (orthogonal) Haar discrete wavelet transform. No single-vector return in this value model, so the two output bands come back as the rows of a (2,N/2) matrix: row 0 is the approximation, row 1 is the detail. Only the Haar family is implemented today (documented, not silently approximated).
From the note above this builtin in the interpreter, where the reasoning was written down as it was built.