Home > Objects > @iData > cwt.m

# iFit/cwt

## PURPOSE

b = cwt(s,dim,scales,wname,'wname',...) : Continuous wavelet transform

## SYNOPSIS

function s = cwt(a,dim,scales,wname,plotit)

## DESCRIPTION

``` b = cwt(s,dim,scales,wname,'wname',...) : Continuous wavelet transform

@iData/cwt function to return the Continuous wavelet transform of data sets
The continuous wavelet transform performs a multi-scale component analysis
It expands the data set into frequency space.

b = cwt(s,scales,'wname') computes the continuous wavelet coefficients
of the signal vector x at real, positive scales, using wavelet 'wname'
b = cwt(..., 'plot') plots the continuous wavelet transform power spectra
plot(log(abs(b).^2))
You can optionally use slice-o-matic for an interactive inspection with:
slice(log(abs(b).^2)) for initial 2D data sets (3D result)

The resulting object has dimension of the input plus a 'period' axis,
and contains the wavelet decomposition coeficients (e.g. complex).
The low period contribution indicates sharp features, whereas the high
period ones indicate slow variation/constant contributions.
For easier interpretation you can compute the power spectrum abs(b).^2

input:  s:      object or array (iData)
dim:    axis rank upon which to perform the wavelet analysis (default=1)
scales: Number of scales or scale range (default=[] for automatic)
wname:  Wavelet Family Short Name among 'Morlet','Paul','Dog' (default='Morlet')
'plot': request plotting of the continuous wavelet transform coefficients

output: b: wavelet transform object or array (iData)
ex:     b=cwt(a); b=cwt(a,1,1:32,'plot')

Reference: Grinsted, A., Moore, J.C., Jevrejeva, S. (2004) Application of the
cross wavelet transform and wavelet coherence to geophysical time
series, Nonlin. Processes Geophys., 11, 561–566, doi:10.5194/npg-11-561-2004
Wavelet software was provided by C. Torrence and G. Compo,
and is available at URL: http://paos.colorado.edu/research/wavelets/
http://noc.ac.uk/using-science/crosswavelet-wavelet-coherence
http://en.wikipedia.org/wiki/Continuous_wavelet_transform

Version: Nov. 26, 2018

## CROSS-REFERENCE INFORMATION

This function calls:
• abs b = abs(s) : absolute value of iData object
• copyobj b = copyobj(s) : makes a copy of iData object
• diff b = diff(s) : computes the difference long 1st axis of iData object
• double d = double(s) : convert iData into doubles
• end b = end(s,index,n) : end value for iData objects
• getaxis [val, lab] = getaxis(s, AxisIndex) : get iData axis value and label
• iData
• interp [b...] = interp(s, ...) : interpolate iData object
• isempty isempty(s) : true for empty iData object
• isnan b = isnan(s) : True for NaN iData object elements
• isscalar b = isscalar(s) : True for scalar iData objects
• isvector b = isvector(s) : True for vector iData object
• label b = label(s, alias, label) : Change iData label for a given alias/axis
• log b = log(s) : natural logarithm value of iData object
• log10 b = log10(s) : base 10 logarithm value of iData object
• mean b = mean(s, dim) : mean value of iData object
• min [m,id] = min(a,b, dim) : computes the maximum value of iData object(s)
• ndims d = ndims(s) : get the dimensionality of iData object
• permute c = permute(a, order) : Permute object dimensions from iData objects/arrays
• plot h = plot(s, method, ...) : plot iData object
• reshape c = reshape(a) : reshape the object Signal
• round b = round(s) : upper integer round of iData object
• set [s,...] = set(s, 'PropertyName', Propertyvalue, ...) : set iData properties
• setalias [s,...] = setalias(s, AliasName, AliasLink, {AliasLabel}) : set iData aliases
• setaxis s = setaxis(s, rank, alias, value) : set iData axes
• size size(s) : get iData object size (number of elements)
• zeros s = zeros(s,N,M,P,...) : initialize an iData array
This function is called by:

Generated on Mon 26-Nov-2018 15:08:42 by m2html © 2005. iFit (c) E.Farhi/ILL EUPL 1.1