Accelerating the pace of engineering and science

• Trials

# conofinf

Cone of influence

## Syntax

cone = conofinf(wname,scales,LenSig,SigVal)
[cone,PL,PR] = conofinf(wname,scales,LenSig,SigVal)
[cone,PL,PR,PLmin,PRmax] = conofinf(wname,scales,LenSig,SigVal)
[PLmin,PRmax] = conofinf(wname,scales,LenSig)
[...] = conofinf(...,'plot')

## Description

cone = conofinf(wname,scales,LenSig,SigVal) returns the cone of influence (COI) for the wavelet wname at the scales in scales and positions in SigVal. LenSig is the length of the input signal. If SigVal is a scalar, cone is a matrix with row dimension length(scales) and column dimension LenSig. If isa vector, cone is cell array of matrices.

[cone,PL,PR] = conofinf(wname,scales,LenSig,SigVal) returns the left and right boundaries of the cone of influence atscale1for the points in . PL and PR are length(SigVal)-by-2 matrices. The left boundaries are(1-PL(:,2))./PL(:,1) and therightboundariesare(1-PR(:,2))./PR(:,1).

[cone,PL,PR,PLmin,PRmax] = conofinf(wname,scales,LenSig,SigVal) returns the equations of the lines that define the minimal left and maximal right boundaries of the cone of influence. PLmin and PRmax are 1-by-2 row vectors where PLmin(1) and PRmax(1) are the slopes of the lines. PLmin(2) and PRmax(2) are the points where the lines intercept the scale axis.

[PLmin,PRmax] = conofinf(wname,scales,LenSig) returns the slope and intercept terms for the first-degree polynomials defining the minimal left and maximal right vertices of the cone of influence.

[...] = conofinf(...,'plot') plots the cone of influence.

## Input Arguments

 wname wname is a string corresponding to a valid wavelet. To verify that wname is a valid wavelet, wavemngr('fields',wname) must return a struct array with a type field of 1 or 2, or a nonempty bound field. scales scales is a vector of scales over which to compute the cone of influence. Larger scales correspond to stretched versions of the wavelet and larger boundary values for the cone of influence. LenSig LenSig is the signal length and must exceed the maximum of SigVal. SigVal SigVal is a vector of signal values at which to compute the cone of influence. The largest value of SigVal must be less than the signal length, LenSig.If SigVal is empty, conofinf returns the slope and intercept terms for the minimal left and maximal right vertices of the cone of influence.

## Output Arguments

 cone cone isthe cone of influence. If SigVal is a scalar, cone is a matrix. The row dimension is equal to the number of scales and column dimension equal to the signal length, LenSig. If SigVal is a vector, cone is a cell array of matrices. The elements of each row of the matrix are equal to 1 in the interval around SigVal corresponding to the cone of influence. PL PL is the minimum value of the cone of influence on the position (time) axis. PR PR is the maximum value of the cone of influence on the position (time) axis. PLmin PLmin is a 1-by-2 row vector containing the slope and scale axis intercept of the line defining the minimal left vertex of the cone of influence. PLmin(1) is the slope and PLmin(2) is the point where the line intercepts the scale axis. PRmax PRmax is a 1-by-2 row vector containing the slope and scale axis intercept of the line defining the maximal right vertex of the cone of influence. PRmax(1) is the slope and PRmax(2) is the point where the line intercepts the scale axis.

## Examples

Cone of influence for Mexican hat wavelet:

```load cuspamax
signal = cuspamax;
wname  = 'mexh';
scales = 1:64;
lenSIG = length(signal);
x = 500;
figure;
cwt(signal,scales,wname,'plot');
hold on
[cone,PL,PR,Pmin,Pmax] = conofinf(wname,scales,lenSIG,x,'plot');
set(gca,'Xlim',[1 lenSIG])
```

Left minimal and right maximal vertices for the cone of influence (Morlet wavelet):

```[PLmin,PRmax] = conofinf('morl',1:32,1024,[],'plot');
% PLmin = -0.1245*u+ 32.0000
% PRmax =  0.1250*u-96.0000```

expand all

### Cone of Influence

Let ψ(t) be an admissible wavelet. Assume that the effective support of ψ(t) is [-B,B]. Letting u denote the translation parameter and s denote the scale parameter, the dilated and translated wavelet is:

andhas effective support [u-sB,u+sB]. The cone of influence (COI) is the set of all t included in the effective support of the wavelet at a given position and scale. This set is equivalent to:

At each scale, the COI determines the set of wavelet coefficients influenced by the value of the signal at a specified position.

## References

Mallat, S. A Wavelet Tour of Signal Processing, London:Academic Press, 1999, p. 174.