FUNCTION REFERENCE

cwt

Continuous 1-D wavelet transform.

Continuous 1-D wavelet transform.

Syntax

wt = cwt(x)

Syntax

wt = cwt(x, wname)

Syntax

[wt, f, coi] = cwt(x, fs)

Syntax

[wt, f, coi] = cwt(x, wname, fs)

Syntax

[wt, f, coi, fb] = cwt(..., Name, Value)

Transform of the vector x with an analytic wavelet: 'morse' (default, symmetry gamma = 3 and time-bandwidth product P^2 = 60), 'amor' (analytic Morlet) or 'bump'. wt has one row per scale and one column per sample, rows ordered from high to low frequency; f holds the wavelet centre frequencies (cycles/sample, or hertz with a sampling frequency fs) and coi the cone of influence, one frequency per sample: coefficients below it are affected by the signal edges. fb is the cwtfilterbank that was used. The wavelets are L1-normalised (peak 2 in frequency), so a sinusoid of amplitude A has |wt| = A at its frequency. The scales are s0*2^(k/NV): the smallest puts the wavelet at 50 % (Morse) or 10 % (amor, bump) of its peak at the Nyquist frequency, the largest fits two wavelet time widths in the signal. A complex x gives a 3-D wt: page 1 is the analytic part (positive frequencies, counterclockwise rotation), page 2 the anti-analytic part (negative frequencies, clockwise).

Options: 'VoicesPerOctave' (NV, 1 to 48, default 10), 'FrequencyLimits' [fmin fmax] (clipped to the valid range), 'TimeBandwidth' (Morse P^2, 3 to 120), 'WaveletParameters' [gamma P^2] (Morse), 'ExtendSignal' (reflect the signal at both ends, default true; false treats it as periodic), 'FilterBank' (a cwtfilterbank object).

Example

[wt, f, coi] = cwt(cos(2*pi*0.05*(0:255)));

Example

x = cos(2*pi*100*(0:999)/1000); [wt, f] = cwt(x, 'amor', 1000, 'VoicesPerOctave', 12, 'FrequencyLimits', [20 300]); [~, k] = max(abs(wt(:, 500))); f(k)   % near 100

Differences from MATLAB: no scalogram plot without outputs; duration sampling periods, 'PeriodLimits', timetables, single precision and the scaling-coefficient output are not supported. The signal is reflected by floor(N/2) samples at each end for every length.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.