# Wavelet Time-Frequency Analyzer

Visualize scalogram of signals

## Description

The **Wavelet Time-Frequency Analyzer** app is an interactive tool for
visualizing scalograms of real- and complex-valued 1-D signals. The scalogram is the absolute
value of the continuous wavelet transform (CWT) plotted as a function of time and frequency.
Frequency is plotted on a logarithmic scale. With the app, you can:

Access all 1-D signals in your MATLAB

^{®}workspaceImport multiple signals simultaneously

Adjust default parameters and visualize scalograms using

`cwt`

Select desired analytic wavelet

Adjust analytic Morse wavelet symmetry and time-bandwidth parameters

Export the CWT to your workspace

Recreate the scalogram in your workspace by generating a MATLAB script

Import multiple signals

For more information, see Using Wavelet Time-Frequency Analyzer App.

## Open the Wavelet Time-Frequency Analyzer App

MATLAB Toolstrip: On the

**Apps**tab, under**Signal Processing and Communications**, click the app icon.MATLAB command prompt: Enter

`waveletTimeFrequencyAnalyzer`

.

## Parameters

`Wavelet`

— Analytic wavelet

`Morse`

(default) | `Morlet`

| `bump`

Analytic wavelet used to compute the CWT. Valid options are
`Morse`

, `Morlet`

, and `bump`

, which
specify the Morse, Morlet (Gabor), and bump wavelet, respectively.

`Time-Bandwidth Product`

— Time-bandwidth product of the Morse wavelet

`60`

(default) | scalar greater than or equal to the **Symmetry** value

Specify the time-bandwidth product of the Morse wavelet as a scalar greater than or
equal to the **Symmetry** value. The ratio of the
**Time-Bandwidth Product** value to the **Symmetry**
value cannot exceed 40.

The values of **Time-Bandwidth Product** and
**Symmetry** correspond to the `WaveletParameters`

name-value argument of `cwt`

.

**Example: **Setting **Time-Bandwidth Product** to 40 and
**Symmetry** value to 5 is equivalent to setting the
`WaveletParameters`

name-value argument
`cwt(…,WaveletParameters=[5 40],…)`

.

`Symmetry`

— Symmetry parameter of the Morse wavelet

`3`

(default) | scalar greater than or equal to `1`

Specify the symmetry parameter of the Morse wavelet as a scalar greater than or
equal to 1. The ratio of the **Time-Bandwidth Product** value to the
**Symmetry** value cannot exceed 40.

The values of **Symmetry** and **Time-Bandwidth
Product** correspond to the `WaveletParameters`

name-value argument of `cwt`

.

`Voices Per Octave`

— Number of voices per octave

`10`

(default) | integer between 1 and 48

Specify the number of voices per octave to use for the CWT as an integer from 1 to 48. The CWT scales are discretized using the specified number of voices per octave. The energy spread of the wavelet in frequency and time automatically determines the minimum and maximum scales.

## Programmatic Use

## Limitations

The MATLAB script you generate to create the scalogram in your workspace uses the name of the selected signal in the

**Signals**pane. The script will throw an error if the variable does not exist in the MATLAB workspace. If an error occurs, either replace the variable name in the script with the name of the original signal or create the variable in your workspace.You can run only one instance of the

**Wavelet Time-Frequency Analyzer**app in a MATLAB session.

## Tips

The Morse wavelet parameters,

**Time-Bandwidth Product**and**Symmetry**, must satisfy three constraints:**Symmetry**, or gamma, must be greater than or equal to 1.**Time-Bandwidth Product**must be greater than or equal to**Symmetry**.The ratio of

**Time-Bandwidth Product**to**Symmetry**cannot exceed 40.

To prevent attempts to visualize a scalogram using invalid settings, the app validates any parameter you change. If you enter a value that violates a constraint, the app automatically replaces it with a valid value. The new value might not be the desired value. To avoid unexpected results, you should ensure any value you enter always results in a valid setting. For more information, see the example Adjust Morse Wavelet Parameters.

## Version History

**Introduced in R2022a**