Main Content

gauswavf

Gaussian wavelet

Description

example

[psi,x] = gauswavf(lb,ub,n) returns the 1st order derivative of the Gaussian wavelet, psi, on an n-point regular grid, x, for the interval [lb,ub]. The effective support of the Gaussian wavelets is [-5, 5].

[psi,x] = gauswavf(lb,ub,n,p) returns the pth derivative. p is an integer from 1 through 8.

The Gaussian function is defined as Cpex2. Cp is such that the 2-norm of the pth derivative of psi is equal to 1.

Note

For visualizing the second or third order derivative of Gaussian wavelets, the convention is to use the negative of the normalized derivative. In the case of the second derivative, scaling by -1 produces a wavelet with its main lobe in the positive y direction. This scaling also makes the Gaussian wavelet resemble the Mexican hat, or Ricker, wavelet. The validity of the wavelet is not affected by the -1 scaling factor.

[psi,x] = gauswavf(lb,ub,n,wname) used the valid wavelet family short name wname plus the order of the derivative in a character vector or string scalar, such as 'gaus4'. To see valid character vectors for Gaussian wavelets, use waveinfo('gaus') or use wavemngr('read',1) and refer to the Gaussian section.

Examples

collapse all

This example shows how to create and plot a Gaussian wavelet of order 8.

Set the initial effective support and grid parameters.

lb = -5;
ub = 5;
n = 1000;

Compute the Gaussian wavelet of order 8.

[psi,x] = gauswavf(lb,ub,n,8);

Now plot the wavelet.

plot(x,psi)
title('Order 8 Gaussian Wavelet')
grid on

Input Arguments

collapse all

Left endpoint of the closed interval, specified as a real number. lb is strictly less than ub.

Data Types: double

Right endpoint of the closed interval, specified as a real number. ub is strictly greater than lb.

Data Types: double

Number of regularly spaced points in the interval [lb,ub], specified as a positive integer. The derivative of the Gaussian is evaluated at these points.

Data Types: double

Positive integer defining the order of the derivative of the Gaussian wavelet, specified as a positive integer. p is an integer from 1 through 8.

Gaussian wavelet to evaluate, specified as a character vector or string scalar. wname is of the form 'cgauN' where N is an integer that denotes the order of the derivative of the Gaussian wavelet. N is an integer from 1 through 8.

Example: 'gaus4' denotes the fourth derivative of the Gaussian wavelet.

Output Arguments

collapse all

Derivative of the Gaussian wavelet, returned as a real-valued 1-by-N vector.

Sample points where the derivative of the Gaussian wavelet is evaluated, returned as a real-valued 1-by-N vector. The sample points are evenly distributed between lb and ub.

Version History

Introduced before R2006a