Main Content

mexihat

Mexican hat (Ricker) wavelet

Description

example

[psi,x] = mexihat(lb,ub,n) returns the Mexican hat wavelet psi evaluated at x, an n-point regular grid in the interval [lb, ub]. The Mexican hat wavelet is also known as the Ricker wavelet.

The Mexican hat wavelet has the interval [-5, 5] as effective support. Nearly 100% of the wavelet's energy is in the interval. Although [-5, 5] is the correct theoretical effective support, a wider effective support, [-8, 8], is used in the computation to provide more accurate results.

This function is proportional to the second derivative function of the Gaussian probability density function.

Note

You can use gauswavf to obtain a second order derivative of a Gaussian wavelet. If you use the negative of this normalized derivative, the resulting wavelet resembles the Mexican hat wavelet.

Examples

collapse all

Create a Mexican hat wavelet with support on [-5,5]. Use 1,000 sample points. Plot the result.

lb = -5;
ub = 5;
N = 1000;
[psi,xval] = mexihat(lb,ub,N);
plot(xval,psi)
title('Mexican Hat Wavelet')

Input Arguments

collapse all

Lower limit of interval, specified as a real-valued scalar.

Upper limit of interval, specified as a real-valued scalar.

Number of sample points, specified as a positive integer.

Output Arguments

collapse all

Mexican hat wavelet, returned as a real-valued vector of length n.

Sampling instants, returned as a real-valued vector of length n.

Version History

Introduced before R2006a

See Also

|