Main Content

Explore Signals

You can use the Signal Analyzer app to visualize signals in the time, frequency, and time-frequency domains. The panner and zoom actions enable you to quickly navigate through a signal, and options to change axes units and scale let you customize display settings. You can link displays in the time domain, and extract signal regions of interest.

Plot Signals

Select a signal by clicking its name in the Workspace browser or the Signal table. Then plot your selection by dragging it to a display. This action also selects the check box to the left of the signal Name on the Signal table. You can also plot a signal by selecting this check box. The app displays a set of axes with the time-domain waveform and a Time tab with options to control the view. The app does not support plotting in the frequency and time-frequency domains for non-finite signals.

If you drag a matrix from the Workspace browser to a display, the app automatically plots each column as a separate signal, up to a maximum of 10 columns. The app creates signals in the Signal table for the remaining columns, but you must drag the additional signals to the display.

Note

Signals with no time information are plotted in units of samples on the x-axis. Signals with time information are plotted in units of time on the x-axis. To plot several signals on the same display, ensure that they all have time information or are all in samples. Otherwise, you get a warning.

View Signals on Multiple Plots

Click Display Grid to create or remove displays.

Tip

To see a time plot side by side with a spectrum, persistence spectrum, spectrogram, or scalogram plot of the same signal, use different displays. On the Display tab, click Display Grid, create a side-by-side pair of displays, and drag-and-drop the signal on both displays. Click Time or Time-Frequency on the Display tab to control what is plotted on each display.

Move Signals Between Displays

To move a signal from one display to another, click the plotted line or select its name on its Legend, for example, . Click the resulting thicker line and drag it to the target display.

Note

If you move the real part or the imaginary part of a complex-valued signal from one display to another, the app moves both parts of the signal.

Play Audio Signals

Since R2024a

To hear an audio signal, select it and click Play in the Playback section of the toolstrip under the Display tab. To repeat the signal, select Play in Loop before playing.

Visualize Signal Spectra

Use the Signal Analyzer app to analyze signals in the frequency domain. When computing signal spectra, you can adjust the spectral resolution by controlling leakage, resolution bandwidth, or window length.

  • If you choose to control leakage, the app computes spectra using the pspectrum function.

  • If you choose to control resolution bandwidth or window length, the app computes spectra using the pwelch function. (since R2023b)

For more information on how Signal Analyzer computes spectra, see Spectrum Computation in Signal Analyzer.

Activate View

To activate the frequency-domain view, click Spectrum on the Display tab and select Spectrum. The app displays a set of axes with the signal spectra, and a Spectrum tab with options to control the view. You cannot plot spectra of non-finite signals.

Axes and Scale

By default, the app displays spectra in decibels. To display spectra in linear scale, clear the Spectrum in dB check box on the Spectrum tab.

Note

When displaying spectra, Signal Analyzer converts the power to dB using 10 log10(Power).

To change the frequency scale, select Linear or Log in the Frequency Scale list.

Pan and Zoom

  • If you activate the panner and zoom in on a particular region of interest, or if you zoom in on a region in the time plot using one of the zoom actions on the Display tab, the spectra in the display correspond to the region of interest and not the entire signals.

  • You cannot zoom out in frequency beyond the Nyquist range.

Nonuniform Sampling

If a signal is nonuniformly sampled, Signal Analyzer interpolates the signal to a uniform grid to compute spectral estimates. The app uses linear interpolation and assumes a sample time equal to the median of the differences between adjacent time points. For the app to support a nonuniformly sampled signal, the median time interval and the mean time interval must obey

1100<Median time intervalMean time interval<100.

Complex-Valued Signals

If you are plotting complex-valued signals, Signal Analyzer displays centered two-sided spectra. The app does not support the logarithmic frequency scale when plotting spectra of complex-valued signals.

Visualize Persistence Spectra

Use the Signal Analyzer app to visualize the persistence spectrum of a signal. The persistence spectrum contains time-dependent probabilities of occurrence of signals at specific frequency locations and power levels. This type of spectrum is useful for detecting brief events.

For more information on how Signal Analyzer computes persistence spectra, see Persistence Spectrum in Signal Analyzer.

Activate View

To activate the persistence spectrum, click Spectrum on the Display tab and select Persistence Spectrum. The app displays a set of axes with the persistence spectrum, and a Persistence Spectrum tab with options to control the view. You can plot the persistence spectrum of only one signal per display.

Axes and Scale

By default, the app displays the persistence spectrum in decibels. To display the persistence spectrum in linear scale, clear the Spectrum in dB check box on the Persistence Spectrum tab.

Pan and Zoom

You cannot zoom out in frequency beyond the Nyquist range.

Nonuniform Sampling

If a signal is nonuniformly sampled, Signal Analyzer interpolates the signal to a uniform grid to compute spectral estimates. The app uses linear interpolation and assumes a sample time equal to the median of the differences between adjacent time points. For the app to support a nonuniformly sampled signal, the median time interval and the mean time interval must obey

1100<Median time intervalMean time interval<100.

Complex-Valued Signals

For complex-valued input signals, Signal Analyzer displays centered two-sided persistence spectra.

Visualize Signal Spectrograms

Use the Signal Analyzer app to analyze how the frequency content of a signal changes as the signal evolves in time. The spectrogram time-frequency representation of a signal is the magnitude squared of its short-time Fourier transform.

For more information on how Signal Analyzer computes spectrograms, see Spectrogram Computation in Signal Analyzer.

Tip

The reassignment technique sharpens the time and frequency localization of spectrograms by reassigning each power spectrum estimate to the location of its center of energy. If your signal contains well-localized temporal or spectral components, the reassignment option generates a spectrogram that is easier to read and interpret. To apply reassignment to a spectrogram, check Reassign in the Spectrogram tab.

Activate View

To activate the spectrogram view of a signal, click Time-Frequency on the Display tab and select Spectrogram. The app displays a set of axes with the signal spectrogram, and a Spectrogram tab with options to control the view. You can plot the spectrogram of only one signal per display. You cannot plot the spectrogram of a non-finite signal.

Axes and Scale

By default, the app displays the spectrogram in decibels. To display the spectrogram in linear scale, clear the Spectrum in dB check box on the Spectrogram tab.

To change the frequency scale, select Linear or Log in the Frequency Scale list.

Pan and Zoom

  • If you activate the panner and zoom in on a particular region of interest, or if you zoom in on a region of the signal in the time plot using one of the zoom actions on the Display tab, the spectrogram in the display corresponds to the region of interest and not the entire signal.

  • You cannot zoom out in frequency beyond the Nyquist range.

Nonuniform Sampling

If a signal is nonuniformly sampled, Signal Analyzer interpolates the signal to a uniform grid to compute spectral estimates. The app uses linear interpolation and assumes a sample time equal to the median of the differences between adjacent time points. For the app to support a nonuniformly sampled signal, the median time interval and the mean time interval must obey

1100<Median time intervalMean time interval<100.

Complex-Valued Signals

For complex-valued input signals, Signal Analyzer displays centered two-sided spectrograms. The app does not support a logarithmic scale when plotting the spectrogram of a complex-valued signal.

Visualize Signal Scalograms

Use the Signal Analyzer app to visualize the scalogram of a signal. The scalogram is useful for identifying signals with low-frequency components and for analyzing signals whose frequency content changes rapidly with time. You need a Wavelet Toolbox™ license to use the scalogram view. You can plot the scalogram of only one signal per display.

For more information on how Signal Analyzer computes scalograms, see Scalogram Computation in Signal Analyzer.

Activate View

To activate the scalogram view of a signal, click Time-Frequency on the Display tab and select Scalogram. The app displays a set of axes with the signal scalogram and a Scalogram tab with options to control the view.

Pan and Zoom

If you activate the panner and zoom in on a particular region of interest, or if you zoom in on a region of the signal in the time plot using one of the zoom actions on the Display tab, the scalogram in the display corresponds to the whole signal, not just the region of interest. Signal Analyzer performs an optical zooming, using interpolation to display a smooth curve.

Nonuniform Sampling

Scalogram view does not support nonuniformly sampled signals.

Complex-Valued Signals

Scalogram view does not support complex-valued signals.

Zoom and Pan Through Signals

The Signal Analyzer app features a panner that enables you to zoom in on and navigate through signals to see how they change in frequency and time. To activate the panner, on the Display tab, click Panner.

The panner renders signals in their entire duration. To select a region of interest, click the panner and drag to create a zoom window. Use the mouse to resize or slide the zoom window along the length of the signal.

  • If the spectrum of the signal is plotted, it corresponds to the region of interest, not the whole signal. For more details, see Spectrum Computation in Signal Analyzer.

  • If the persistence spectrum of the signal is plotted, it corresponds to the region of interest, not the whole signal. For more details, see Persistence Spectrum in Signal Analyzer.

  • If the spectrogram of the signal is plotted, it corresponds to the region of interest, not the whole signal. For more details, see Spectrogram Computation in Signal Analyzer.

  • If the scalogram of the signal is plotted, it corresponds to the whole signal, not the region of interest. Signal Analyzer performs an optical zooming, using interpolation to display a smooth curve. For more details, see Scalogram Computation in Signal Analyzer.

  • You cannot zoom out in frequency beyond the Nyquist range.

Edit Time Information and Link Displays in Time

Use the Signal Analyzer app to add time information to signals. In the Signal table, select the signals whose time information you want to add or modify. Add time information to the signals by clicking Time Values in the Analyzer tab.

Note

  • You cannot edit the time information of a timetable or time series with inherent time information.

  • You cannot edit the time information of a labeled signal set.

  • You cannot edit the time information for individual channels of a multichannel signal. You must edit the time information for the whole signal.

You can express the time information in terms of a sample rate or sample time, and a start time. You can also add explicit time values using a numeric vector, a duration array, or a MATLAB® expression. Time values must be unique and cannot be NaN, but they need not be uniformly spaced. The app derives a sample rate from the time values and displays it in the Time column of the Signal table. For more details, see Edit Sample Rate and Other Time Information.

Note

Filtering and scalogram view do not support nonuniformly sampled signals.

  • If a signal is nonuniformly sampled, then Signal Analyzer interpolates the signal to a uniform grid to compute spectral estimates. The app uses linear interpolation and assumes a sample time equal to the median of the differences between adjacent time points. The derived sample rate in the Signal table has an asterisk to indicate that the signal is nonuniformly sampled. For a nonuniformly sampled signal to be supported, the median time interval and the mean time interval must obey

    1100<Median time intervalMean time interval<100.

    Note

    The interpolation is used only to compute spectral estimates. Time plots are not resampled.

  • You can link display time spans so that plot responses are synchronized when you pan and zoom horizontally. The signals in the displays you want to link must contain time information. To link the time span of a display to the time spans of the displays linked already, select the display and, on the Display tab, select Link Time. To unlink a display, select it and clear Link Time.

    Note

    Selecting Link Time links the selected display to the complete collection of displays that have already been linked.

    Displays with linked time spans have the following operations synchronized:

    • Panning by selecting and dragging the plot or by using the display panner.

    • Zooming in, zooming out, or zooming on the time axis. Zooming in or out on one display affects only the time axis in the remaining linked displays.

    • Fitting data to view. The app stretches the common time axis so that it shows the span from the earliest to the latest time among all signals in the linked displays.

    • If the axes of two displays are linked in time, then the time cursors in the displays are linked.

    The time axis of a linked display might update as you add or remove signals.

Note

Frequency axes are never linked between displays.

Extract Signal Regions of Interest

The Signal Analyzer app enables you to extract regions of interest from the signals you are studying and export them for further analysis. To extract regions of interest, select the display that has them. On the Display tab, click Extract Signals, or right-click the display and select Extract Signals.

  • Select Between Time Limits to extract a region of interest defined by the time limits of the selected display. To change the time limits, you can use the panner, select one of the zoom actions on the Display tab, or change the limit values on the Display, Time, Spectrogram, or Scalogram tabs.

  • Select Between Time Cursors to extract a region of interest defined by the locations of the time-domain cursors in the selected display.

  • If a signal has time information, you can preserve the start time of the region of interest by checking Preserve Start Time.

The extracted regions of interest are added at the bottom of the Signal table.

Previous Step

Preprocess Signals

Next Step

Measure Signals

See Also

Related Examples

More About