Main Content

wscalogram

(Not recommended) Scalogram for continuous wavelet transform

This function is no longer recommended. To obtain the scalogram, use cwt instead. See Version History.

Syntax

SC = wscalogram(TYPEPLOT,COEFS)
SC = wscalogram(TYPEPLOT,COEFS,'PropName1',PropVal1,...)

Description

SC = wscalogram(TYPEPLOT,COEFS) computes the scalogram SC which represents the percentage of energy for each coefficient. COEFS is the matrix of the continuous wavelet coefficients (see cwt).

The scalogram is obtained by computing:

S = abs(coefs.*coefs); SC = 100*S./sum(S(:))

When TYPEPLOT is equal to 'image', a scaled image of scalogram is displayed. When TYPEPLOT is equal to 'contour', a contour representation of scalogram is displayed. Otherwise, the scalogram is returned without plot representation.

SC = wscalogram(TYPEPLOT,COEFS,'PropName1',PropVal1,...) allows you to modify some properties. The valid choices for PropName are:

'scales'Scales used for the CWT.
'ydata'Signal used for the CWT.
'xdata'x values corresponding to the signal values.
'power'Positive real value. Default value is zero.

If power > 0, coefficients are first normalized

coefs(k,:) = coefs(k,:)/(scales(k)^power)

and then the scalogram is computed as explained above.

Examples

% Compute signal s
t = linspace(-1,1,512);
s = 1-abs(t);

% Plot signal s
figure;
plot(s), axis tight

% Compute coefficients COEFS using cwt
COEFS = cwt(s,1:32,'cgau4');

% Compute and plot the scalogram (image option)
figure;
SC = wscalogram('image',COEFS);

% Compute and plot the scalogram (contour option)
figure;
SC = wscalogram('contour',COEFS);

Version History

Introduced in R2008a

expand all

See Also