Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Getting Started with Signal Analyzer App

The Signal Analyzer app is an interactive tool for visualizing, measuring, analyzing, and comparing signals, in the time domain, in the frequency domain, and in the time-frequency domain. The app provides a way to work with many signals of varying durations at the same time and in the same view.

Start the app by choosing it from the Apps tab on the MATLAB® Toolstrip. You can also start the app by typing signalAnalyzer at the MATLAB command prompt.

A typical workflow for inspecting and comparing signals using the Signal Analyzer app is:

  1. Select Signals to Analyze — Select any signal available in the MATLAB workspace. The app accepts numeric arrays and signals with inherent time information, such as MATLAB timetables and timeseries objects.

  2. Explore Signals — Plot, measure, and compare data, their spectra, or their spectrograms. Look for features and patterns in the time domain, in the frequency domain, and in the time-frequency domain. Specify sample rates of signals with no inherent time information. Add time information to such signals using numeric vectors, duration arrays, or MATLAB expressions.

  3. Share Analysis — Copy displays from the app to the clipboard as images.

  4. Save and Load Signal Analyzer Sessions — Resume your analysis later or in another machine.

Select Signals to Analyze

The Signal Analyzer app works with vectors, matrices, MATLAB timetables, or timeseries objects in the MATLAB workspace. When you start the app, all usable signals in the workspace appear in the Workspace browser at the bottom-left corner.

Select Signals from the Workspace Browser

Select signals from the Workspace browser by clicking their names and dragging them to the Signal table at the top-left corner. To plot a signal, drag it to a display. If you select the check box next to the name of a signal in the Signal table, the signal is plotted in the selected display. You can also drag signals directly from the Workspace browser to a display. The dragged signals are plotted in the display and listed in the Signal table.

Each column of a matrix is treated as an independent signal. For example, a 100-by-3 matrix called sig appears in the Signal table as three 100-sample signals, sig(:,1), sig(:,2), and sig(:,3).

    Note:   If you attempt to import signals with more than 100 columns, the app displays a warning.

    It is possible that the matrix you are trying to import is the transpose of a multichannel signal that you want to analyze. In that case, click No and transpose the matrix in the workspace. If you do want to import the columns as separate signals, click Yes. If you drag the matrix to a display and click Yes in the dialog box, then the app plots only the first 10 columns of the matrix but imports all the columns.

If you modify a signal in the MATLAB workspace, the Workspace browser updates automatically. To have the app recognize the changes, reimport the signal by dragging it again to the Signal table or to a display.

If you add or remove columns to a matrix, the app deletes the signals, clears any plots of them, and creates new signals with the modified matrix dimensions.

Filter Signals in the Signal Table

To help search through a large amount of data in the Signal table, you can filter signals. The filter criteria can be any text that is contained in the signal name or in other columns.

  • To show signals with a given name, enter the text you seek into the Filter Signals text box. The matches are highlighted in the filter results.

    Suppose you have three sig signals, sig01, sig02, and sig03, and three sgn signals, sgn01, sgn02, and sgn03. You can enter sg to show the three sgn signals, or enter 2 to show sig02 and sgn02.

  • You can also filter signals according to their time information. To access this functionality, click inside the search results box, and then click Advanced. For details on entering time information, see Edit Sample Rate and Other Time Information.

    Suppose that you have six signals with these sample times and start times.

    The Advanced menu lets you search signals by Name, Samples, Start Time, or Time in terms of sample rate or sample time.

    If you select the Time option and set it to 20, the app finds the four signals sampled at 200 Hz. In the second text box, if you select the Start Time option and enter 0, the app finds sgn01 and sig01.

      Note:   The filter matches values as text, not numbers. For instance, if you choose the Start Time option and enter 00, then the filter does not return any results.

  • You can save and store a filter for future use. From the Advanced menu of the search results box, click Quick Search Settings. Then enter a name in the Save Search As box, and click Save.

Explore Signals

You can use the Signal Analyzer app to perform several tasks that help you explore your data.

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.

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

  • If you zoom into 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.

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

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

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. Signal Analyzer does not support signals with time gaps greater than 25 times the median time interval.

Visualize Signal Spectrograms

Use the Signal Analyzer app to analyze a signal in the time-frequency domain. To activate the time-frequency view of a signal, click Spectrogram on the Display tab. 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 zooming into a particular region of interest, the spectrogram in the display corresponds to the region of interest, not the whole signal.

  • If you zoom into 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.

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

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. Signal Analyzer does not support signals with time gaps greater than 25 times the median time interval.

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. See Spectrum Computation in Signal Analyzer for more details.

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

Edit Time Information and Link Displays

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

    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. See Edit Sample Rate and Other Time Information for more details.

  • 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. Signal Analyzer does not support signals with time gaps greater than 25 times the median time interval.

  • You can link display time spans so that plots respond in sync 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 those 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.

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

    Note:   Frequency axes are never linked.

Measure Signal and Spectrum 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 independent.

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

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

  4. To hide the cursors, click Data Cursors ▼ and select Hide.

Share Analysis

You can share the plots that you have produced using the Signal Analyzer app by copying one or more displays to the clipboard as images and pasting them into another application.

To copy displays to the clipboard, on the Analyzer tab, click Copy All Displays ▼. You can then copy either the selected display or the complete display layout.

To copy a single display to the clipboard, you can also right-click the display and select Copy Display.

Save and Load Signal Analyzer Sessions

If you want to share session snapshots or archive them to view later, save the Signal Analyzer session to a MAT-file or MLDATX-file. Using MLDATX-files results in faster save and load times.

Save a Session to a MAT-File or MLDATX-File

  1. On the Analyzer tab, click Save ▼ and select Save.

  2. Browse to where you want to save the file, name the file, choose the format, and click Save.

If you want to update the file, click Save. If you want to save the session to a different file, click Save ▼ and select Save as.

Load a Saved Session

  1. On the Analyzer tab, click Open.

  2. Browse to the MAT-file or MLDATX-file saved from a previous session, select it, and click Open. The signal data and properties appear as they were when the file was last saved.

To start a new session, on the Analyzer tab, click New.

Customize the Signal Analyzer Interface

Specify Line Color and Style

To specify the line style and color, click in the Line column of a signal. If the line column is not shown, add the column using the column selector button . Select a color from the palette and a line style. Click Custom to choose custom colors for your signals. You can specify custom colors as RGB triplets or as hexadecimal codes.

Add or Remove Columns in the Signal Table

Columns in the Signal table display the plot configuration and signal properties. To add or remove a column, click the column selector button . From the list, select the columns that you want to display and click OK. After you select a column, the new column is added to the table in the order that it appears in the column selection list.

Modify a Display in the Signal Analyzer App

GoalAction
Show or hide the Signal table or the Workspace browser

On the Analyzer tab, click one of the layout buttons.

Zoom and pan to inspect the data.

On the Display tab, select one of the zoom actions.

Alternatively, activate the panner by clicking Panner .

Show or hide legends identifying plotted signals.

On the Display tab, click Legend .

Each display gets its own legend. The legends appear either at the top of the display or to the right of the display.

Link or unlink a display.

Select a display. On the Display tab, select Link Time. Link Time is enabled only when there are two or more displays and at least one signal contains time information.

To unlink a display, select it and clear Link Time.

Frequency axes are never linked.

Normalize the data for each signal from 0 to 1 along the y-axis of a time plot.

On the Time tab, select Normalize Y Axis.

Show markers at each sample point in a time plot of a signal.On the Time tab, select Show Markers.
Set the minimum and maximum values of the plot axes.

On the Time, Spectrum, or Spectrogram tab, enter the axes limit values. You can also change the minimum and maximum time values on the Display tab.

See Also

Related Examples

More About

Was this topic helpful?