void Scalogram( Matrix Decomposition, Matrix ThreshOpt, int StartLevel, int EndLevel, Matrix Power, String YScale, String Header )
Matrix Decomposition
A wavelet decomposition produced by the WAVFT subroutine.
Matrix ThreshOpt
A numeric vector with four elements that specifies the thresholding to be used. If this parameter is not specified, no thresholding is performed. The documentation for the WAVIFT subroutine
describes the use of the ThreshOpt vector.
int StartLevel
A scalar that specifies the lowest level to be displayed in the plot. If this parameter is not specified, the starting level of the decomposition is used.
int EndLevel
A scalar that specifies the highest level to be displayed in the plot. If this parameter is not specified, the end level of the decomposition is used.
Matrix Power
A scalar in (0,1] that specifies the exponent of a power transformation applied to the detail coefficients. Each detail coefficient is first scaled into the interval [0,1] and then exponentiated
by Power. Small values of Power increase the visibility of small coefficients. If this parameter is not specified, Power=1/3 is used.
String YScale
If YScale is "log", the vertical axis is plotted on a logarithmic scale. Otherwise, the vertical axis is not transformed. If this parameter is not specified, the vertical axis is not
transformed.
String Header
The title of the plot. If this parameter is not specified, the default title "Scalogram" is used.
This module creates a scalogram of the wavelet decomposition from level StartLevel to level EndLevel. At each level, the plot displays each detail coefficient as a filled rectangle whose color corresponds to the magnitude of the coefficient. By default, the heights of the rectangles grow as a power of two as the level increases. Low-level coefficients are drawn as wide and short rectangles to indicate that they localize a wide interval in the independent variable but a narrow range of frequencies; rectangles for high-level coefficients are drawn narrow and tall. If you include all levels in the scalogram, the heights of the rectangles at the low levels are so small that they are barely visible. To correct for this, you can scale the vertical axis of the plot logarithmically using the YScale="log" option.
PI = 4 * atan( 1 ); x = T( do(0, 1, 1/1023) ); y = sqrt( x#(1-x) ) # sin( PI*2.1/(x+0.05) ); call wavft( decomp, y, WAV_HAAR ); call Scalogram( decomp, WAV_SURESHRINK, 1, 7, 0.25, "log", );