Main Content

Explore Signals

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.

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.

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 signal from one display to another, the app moves both parts of the signal.

Visualize Signal Spectra

Use the Signal Analyzer app to analyze signals in the frequency domain. To activate the frequency-domain view of a signal, click Spectrum ▼ on the Display tab and select Spectrum. The app displays a set of axes with the signal spectrum, and a Spectrum tab with options to control the view.

  • If the panner is activated and is zoomed in on a particular region of interest, the spectrum in the display corresponds to the region of interest, not the whole signal.

  • 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 spectrum in the display corresponds to the region of interest, not the whole signal.

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

  • To see a time plot and a spectrum plot of the same signal side-by-side, use different displays. Drag the signal to two displays. Click Time or Spectrum on the Display tab to control what is plotted on each display.

Signal Analyzer scales the spectrum so that, if the frequency content of a signal falls exactly within a bin, its amplitude in that bin is the true average power of the signal. For example, the average power of a sinusoid is one-half the square of the sinusoid amplitude. For more details, see Measure Power of Deterministic Periodic Signals. For more information on how Signal Analyzer computes spectra, see Spectrum Computation in Signal Analyzer.

Note

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

If any complex signals are plotted, Signal Analyzer displays centered two-sided spectra.

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. 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.

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 given frequency locations and power levels. This type of spectrum is useful for detecting brief events.

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 cannot zoom out in frequency beyond the Nyquist range.

Note

You can plot the persistence spectrum of only one signal per display.

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

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

Visualize Signal Spectrograms

Use the Signal Analyzer app to analyze a signal in the time-frequency domain. 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.

Note

You can plot the spectrogram of only one signal per display.

  • If the panner is activated and is zoomed in on a particular region of interest, the spectrogram in the display corresponds to the region of interest, not the whole signal.

  • 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, not the whole signal.

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

  • To see a time plot and a spectrogram plot of the same signal side-by-side, use different displays. Drag the signal to two displays. Click Time or Time-Frequency on the Display tab to control what is plotted on each display.

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

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, then this option generates a spectrogram that is easier to read and interpret. To apply reassignment to a spectrogram, check Reassign in the Spectrogram tab.

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. 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.

For complex input signals, Signal Analyzer displays centered two-sided spectrograms.

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.

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.

Note

You can plot the scalogram of only one signal per display.

  • If the panner is activated and is zoomed in on a particular region of interest, 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.

  • 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.

  • To see a time plot and a scalogram plot of the same signal side by side, 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.

Note

  • Scalogram view does not support complex signals.

  • Scalogram view does not support nonuniformly sampled signals.

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

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.

Measure Signal, Spectrum, and Time-Frequency Data

Measure your data using data cursors:

  1. On the Display tab, click Data Cursors ▼ to add one or two data cursors to all the displays. Time-domain and frequency-domain cursors are not linked and can be moved independently.

  2. The persistence spectrum, spectrogram, and scalogram views display two-dimensional crosshair cursors.

  3. To move a data cursor, drag it left, right, up, or down to a point of interest. To move the cursor sample-by-sample, click the time or frequency field and use the arrow keys.

  4. You can move a data cursor to a specific point without dragging it. Click the data cursor time or frequency field and enter a value.

    If the signal was not sampled at a point of interest, then the app linearly interpolates the value. If the value is interpolated, an asterisk appears in the data cursor label.

  5. By default, cursors snap to the nearest data point. To change this behavior, clear the Snap to Data check box on the Display tab.

  6. To toggle the cursors, click Data Cursors.

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

Share Analysis

See Also

Related Examples

More About