Documentation

sptool

Open interactive digital signal processing tool

Syntax

sptool

Description

The command, sptool, opens SPTool, a suite of four tools: Signal Browser, Filter Design and Analysis Tool, FVTool, and Spectrum Viewer. These tools provide access to many of the signal, filter, and spectral analysis functions in the toolbox. When you type sptool at the command line, the SPTool suite opens.

Using SPTool, you can:

  • Analyze signals listed in the Signals list box with the Signal Browser.

  • Design or edit filters with the Filter Design and Analysis Tool (includes a Pole/Zero Editor).

  • Analyze filter responses for filters listed in the Filters list box with FVTool.

  • Apply filters in the Filters list box to signals in the Signals list box.

  • Create and analyze signal spectra with the Spectrum Viewer.

  • Print the Signal Browser, Filter Design and Analysis Tool, and Spectrum Viewer.

You can activate all four integrated signal processing tools from SPTool.

Signal Browser

The Signal Browser, hereafter referred to as the scope, allows you to view, measure, and analyze the time-domain information of one or more signals. To activate the Signal Browser, press the View button under the Signals list box in SPTool.

See the following sections for more information on the Signal Browser:

Displaying Multiple Signals

Multiple Signal Input

Select more than one signal in the Signals list box to show multiple signals within the same display or on separate displays. By default, the signals appear as different-colored lines on the same display. The signals can have different dimensions, sample rates, and data types. Each signal can be either real or complex valued.

Multiple Signal Colors

By default, Signal Browser has a white axes background and chooses line colors for each channel in a manner similar to the MATLAB® plot function. Signal Browser considers each of the real and imaginary components of the input signals to be a channel, and assigns each channel a line color in the following order:

  1. Blue

  2. Dark Green

  3. Red

  4. Cyan

  5. Purple

  6. Dark Yellow

  7. Black

If there are more than 7 channels, the scope repeats this order to assign line colors to the remaining channels. For example, if you select 4 complex-valued input signals, the following legend appears in the display.

If all the input signals are real-valued, Signal Browser skips the line colors that would be associated with their imaginary components. For example, if you select 4 real-valued input signals, the following legend appears in the display.

To manually modify any line color, select View > Style to open the Style dialog box. Next to Properties for line, select the signal name whose color you want to change. Then, next to Line, click the Line color button ( ) and select any color from the palette. To change the axes background color, click the Axes background color button ( ), and select any color from the palette.

Multiple Displays

You can display multiple channels of data on different displays in the scope window. In the scope toolbar, select View > Layout, or select the Layout button ( ).

    Note:   The Layout menu item and button are not available when the scope is in snapshot mode.

This feature allows you to tile the window into a number of separate displays, up to a grid of 4 rows and 4 columns. For example, if there are three inputs to the scope, you can display the signals in separate displays by selecting row 3, column 1, as shown in the following figure.

After you select row 3, column 1, the scope window is partitioned into three separate displays, as shown in the following figure.

When you use the Layout option to tile the window into multiple displays, the display highlighted in blue is referred to as the active display. The scope dialog boxes reference the active display.

Signal Display

The Signal Browser uses the longest time length of all the input signals selected in the Signals list box for the time range. To communicate the array of times that corresponds to the current display, the scope uses the Minimum time-axis limit, Time units, and Maximum time-axis limit indicators on the scope window. The following figure highlights these aspects of the Signal Browser window.

  • Minimum time-axis limit — The Signal Browser sets the minimum time-axis limit to 0.

  • Maximum time-axis limit — The Signal Browser sets the maximum time-axis limit to the final time step of the longest input signal.

  • Time units — The units used to describe the time-axis. The Signal Browser sets the time units using the value of the Time Units parameter on the Main tab of the Visuals:Time Domain Options dialog box. By default, this parameter is set to Metric (based on Time Span) and displays in metric units such as microseconds, milliseconds, minutes, days, etc. You can change the unit of measure to Seconds to always display the time-axis values in units of seconds. You can change it to None to suppress the display of units of measure on the time-axis. When you set this parameter to None, then the Signal Browser shows only the word Time on the time-axis.

    To hide both the word Time and the values on the time-axis, set the Show time-axis labels parameter to None. To hide both the word Time and the values on the time-axis in all displays except the bottom ones in each column of displays, set this parameter to Bottom Displays Only. This behavior differs from that of the Simulink® Scope block, which always shows the values but never shows a label on the x-axis.

Signal Names and Legend Strings

Signal Browser uses the names of the signals in the SPTool as the strings displayed in the legends. If you change the name of any selected signal in the Signals list box, its corresponding legend string in Signal Browser changes immediately. To change the name of any selected signal, from the SPTool menu, select Edit > Name. Signal Browser automatically updates the legend string to reflect the new signal name you entered. Similarly, if you modify any string in a legend in Signal Browser, SPTool updates the corresponding signal name in the Signals list box.

Axes Maximization

You can specify whether to display the Signal Browser in maximized axes mode. In this mode, the axes are expanded to fill the entire display. In each display, there is no space to show titles or axis labels. The minimum and maximum time-axis limits are located at the far-left and far-right edges of the display. The values at the axis tick marks appear as grid lines on top of the axes. The following figure highlights how three displays appear in maximized axes mode in the Signal Browser window.

To enable or disable this mode, in the Signal Browser menu, select View > Properties to bring up the Visuals:Time Domain Options dialog box. In the Main pane, you can set the Maximize axes parameter to one of the following options:

  • Auto — In this mode, the axes appear maximized in all displays only if the Title and Y-Axis label parameters are empty for every display. If you enter any value in any display for either of these parameters, the axes are not maximized.

  • On — In this mode, the axes appear maximized in all displays. Any values entered into the Title and Y-Axis label parameters are hidden.

  • Off — In this mode, none of the axes appear maximized.

See the Visuals — Time Domain Options section for more information.

Toolbar

The Signal Browser toolbar contains the following buttons.

Print Button

ButtonMenu LocationShortcut KeysDescription

File > PrintCtrl+P

Print the current scope window. To print the current scope window to a figure rather than sending it to your printer, select File > Print to figure.

Zoom and Axes Control Buttons

ButtonMenu LocationShortcut KeysDescription

Tools >
Zoom In

N/A

When this tool is active, you can zoom in on the scope window. To do so, click in the center of your area of interest, or click and drag your cursor to draw a rectangular area of interest inside the scope window.

Tools >
Zoom X

N/A

You access the Zoom X button from the menu under the Zoom In icon. When this tool is active, you can zoom in on the x-axis. To do so, click inside the scope window, or click and drag your cursor along the x-axis over your area of interest.

Tools >
Zoom Y

N/A

You access the Zoom Y button from the menu under the Zoom In icon. When this tool is active, you can zoom in on the y-axis. To do so, click inside the scope window, or click and drag your cursor along the y-axis over your area of interest.

Tools >
Pan

N/A

You access the Pan button from the menu under the Zoom In icon. When this tool is active, you can pan on the scope window. To do so, click in the center of your area of interest and drag your cursor to the left, right, up, or down, to move the position of the display.

Tools >
Scale Y-Axis Limits
Ctrl+A

Click this button to scale the axes in the active scope window.

Alternatively, you can enable automatic axes scaling by selecting one of the following options from the Tools menu:

  • Automatically Scale Axes Limits — When you select this option, the scope scales the axes as needed during simulation.

  • Scale Axes Limits after 10 Updates — When you select this option, the scope scales the axes after 10 updates. The scope does not scale the axes again during the simulation.

  • Scale Axes Limits at Stop — When you select this option, the scope scales the axes each time the simulation is stopped.

Tools >
Scale X-Axis Limits
N/A

You access the Scale X-Axis Limits button from the menu under the current Axis Limits icon. Click this button to scale the axes in the X direction in the active scope window.

Alternatively, you can enable automatic axes scaling by selecting one of the following options from the Tools menu:

  • Automatically Scale Axes Limits — When you select this option, the scope scales the axes as needed during simulation.

  • Scale Axes Limits after 10 Updates — When you select this option, the scope scales the axes after 10 updates. The scope does not scale the axes again during the simulation.

  • Scale Axes Limits at Stop — When you select this option, the scope scales the axes each time the simulation is stopped.

Tools >
Scale X & Y Axes Limits
N/A

You access the Scale X & Y Axes Limits button from the menu under the current Axis Limits icon. Click this button to scale the axes in both the X and Y directions in the active scope window.

Alternatively, you can enable automatic axes scaling by selecting one of the following options from the Tools menu:

  • Automatically Scale Axes Limits — When you select this option, the scope scales the axes as needed during simulation.

  • Scale Axes Limits after 10 Updates — When you select this option, the scope scales the axes after 10 updates. The scope does not scale the axes again during the simulation.

  • Scale Axes Limits at Stop — When you select this option, the scope scales the axes each time the simulation is stopped.

Measurements Buttons

Tools >
Measurements
>
Cursor Measurements

N/A

Open or close the Cursor Measurements panel. This panel puts screen cursors on all the displays.

See the section for more information.

Tools >
Measurements
>
Signal Statistics

N/A

Open or close the Signal Statistics panel. This panel displays the maximum, minimum, peak-to-peak difference, mean, median, RMS values of a selected signal, and the times at which the maximum and minimum occur.

See the section for more information.

Tools >
Measurements
>
Bilevel Measurements

N/A

Open or close the Bilevel Measurements panel. This panel displays information about a selected signal's transitions, overshoots or undershoots, and cycles.

See the section for more information.

Tools >
Measurements
>
Peak Finder

N/A

Open or close the Peak Finder panel. This panel displays maxima and the times at which they occur, allowing the settings for peak threshold, maximum number of peaks, and peak excursion to be modified.

See the section for more information.

Other Buttons

Tools > Play Selected Signal

N/A

Play an audio signal. The function soundsc is used to play the signal.

View > Show All Legends

N/A

Show a legend that matches each line style to a signal name in every display.

View > Layout

N/A

Arrange the layout of displays in the Signal Browser. This feature allows you to tile your screen into a number of separate displays, up to a grid of 4 rows and 4 columns. You may find multiple displays useful when you select multiple input signals in SPTool. The default display is 1 row and 1 column. See the Multiple Displays section for more information.

You can control whether this toolbar appears in the Signal Browser window. From the Signal Browser menu, select View > Toolbar.

Measurements Panels

The Measurements panels are the five panels that appear at the right side of the Signal Browser. These panels are labeled Trace selection, Cursor measurements, Signal statistics, Bilevel measurements, and Peak finder.

Measurements Panel Buttons

Each of the Measurements panels contains the following buttons that enable you to modify the appearance of the current panel.

ButtonDescription

Move the current panel to the top. When you are displaying more than one panel, this action moves the current panel above all the other panels.

Collapse the current panel. When you first enable a panel, by default, it displays one or more of its panes. Click this button to hide all of its panes to conserve space. After you click this button, it becomes the expand button .

Expand the current panel. This button appears after you click the collapse button to hide the panes in the current panel. Click this button to display the panes in the current panel and show measurements again. After you click this button, it becomes the collapse button again.

Undock the current panel. This button lets you move the current panel into a separate window that can be relocated anywhere on your screen. After you click this button, it becomes the dock button in the new window.

Dock the current panel. This button appears only after you click the undock button. Click this button to put the current panel back into the right side of the Scope window. After you click this button, it becomes the undock button again.

Close the current panel. This button lets you remove the current panel from the right side of the Scope window.

Some panels have their measurements separated by category into a number of panes. Click the pane expand button to show each pane that is hidden in the current panel. Click the pane collapse button to hide each pane that is shown in the current panel.

Trace Selection Panel

When you use the scope to view multiple signals, the Trace Selection panel appears if you have more than one signal displayed and you click any of the other Measurements panels. The Measurements panels display information about only the signal chosen in this panel. Choose the signal name for which you would like to display time domain measurements. See the following figure.

You can choose to hide or display the Trace Selection panel. In the Scope menu, select Tools > Measurements > Trace Selection.

Cursor Measurements

The Cursor Measurements panel displays screen cursors. In the Scope menu, select Tools > Measurements > Cursor Measurements. Alternatively, in the Scope toolbar, click the Cursor Measurements button.

You can use the mouse or the left and right arrow keys to move vertical or waveform cursors and the up and down arrow keys for horizontal cursors.

The Measurements pane shows the time and value measurements.

  • 1 |— Shows or enables you to modify the time or value at cursor number one, or both.

  • 2 :— Shows or enables you to modify the time or value at cursor number two, or both.

  • Δt— Shows the absolute value of the difference in the times between cursor number one and cursor number two.

  • ΔV— Shows the absolute value of the difference in signal amplitudes between cursor number one and cursor number two.

  • 1/Δt— Shows the rate, the reciprocal of the absolute value of the difference in the times between cursor number one and cursor number two.

  • ΔV/Δt— Shows the scope, the ratio of the absolute value of the difference in signal amplitudes between cursors to the absolute value of the difference in the times between cursors.

Signal Statistics Panel

The Signal Statistics panel displays the maximum, minimum, peak-to-peak difference, mean, median, and RMS values of a selected signal. It also shows the x-axis indices at which the maximum and minimum values occur. In the Scope menu, select Tools > Measurements > Signal Statistics. Alternatively, in the scope toolbar, click the Signal Statistics button.

The statistics shown are:

  • Max — The maximum or largest value within the displayed portion of the input signal. For more information on the algorithm this measurement uses, see the MATLAB max function reference.

  • Min — The minimum or smallest value within the displayed portion of the input signal. For more information on the algorithm this measurement uses, see the MATLAB min function reference.

  • Peak to Peak — The difference between the maximum and minimum values within the displayed portion of the input signal. For more information on the algorithm this measurement uses, see the Signal Processing Toolbox™ peak2peak function reference.

  • Mean —The average or mean of all the values within the displayed portion of the input signal. For more information on the algorithm this measurement uses, see the MATLAB mean function reference.

  • Median — The median value within the displayed portion of the input signal. For more information on the algorithm this measurement uses, see the MATLAB median function reference.

  • RMS — Shows the difference between the maximum and minimum values within the displayed portion of the input signal. For more information on the algorithm this measurement uses, see the Signal Processing Toolbox rms function reference.

When you use the zoom options in the Scope, the Signal Statistics measurements automatically adjust to the time range shown in the display. For example, you can zoom in on one pulse to make the Signal Statistics panel display information about only that particular pulse.

The Signal Statistics measurements are valid for any units of the input signal. The letter after the value associated with each measurement represents the appropriate International System of Units (SI) prefix, such as m for milli-. For example, if the input signal is measured in volts, an m next to a measurement value indicates that this value is in units of millivolts.

Bilevel Measurements Panel

The Bilevel Measurements panel shows information about transitions, overshoots, undershoots, and cycles for a selected signal. You can choose to hide or display the Bilevel Measurements panel. In the scope menu, select Tools > Measurements > Bilevel Measurements. Alternatively, in the scope toolbar, you can select the Bilevel Measurements button.

When you use the zoom options in the Scope, the bilevel measurements automatically adjust to the time range shown in the display. For example, you can zoom in on one rising edge to make the Bilevel Measurements panel display information about only that particular rising edge. This feature does not apply to the High and Low measurements.

The Bilevel Measurements panel is separated into four panes, labeled Settings, Transitions, Overshoots / Undershoots, and Cycles. You can expand each pane to see the available options.

The Settings pane enables you to modify the properties used to calculate various measurements involving transitions, overshoots, undershoots, and cycles. You can modify the high-state level, low-state level, state-level tolerance, upper-reference level, mid-reference level, and lower-reference level, as shown in the following figure.

 Bilevel Measurements Plot

  • Auto State Level — When this check box is selected, the Bilevel measurements panel autodetects the high- and low- state levels of a bilevel waveform. For more information on the algorithm this option uses, see the Signal Processing Toolbox statelevels function reference. When this check box is cleared, you can enter in values for the high- and low- state levels manually.

    • High — Manually specify the value for a positive polarity or high-state level.

    • Low — Manually specify the value for a negative polarity or low-state level.

  • State Level Tolerance — Tolerance within which the initial and final levels of each transition must be within their respective state levels. This value is expressed as a percentage of the difference between the high- and low-state levels.

  • Upper Ref Level — Used to compute the end of the rise-time measurement or the start of the fall time measurement. This value is expressed as a percentage of the difference between the high- and low-state levels.

  • Mid Ref Level — Used to determine when a transition occurs. This value is expressed as a percentage of the difference between the high- and low- state levels. The mid-reference level is shown as a horizontal line, and its corresponding mid-reference level instant is shown as a vertical line.

  • Lower Ref Level — Used to compute the end of the fall-time measurement or the start of the rise-time measurement. This value is expressed as a percentage of the difference between the high- and low-state levels.

  • Settle Seek — The duration after the mid-reference level instant when each transition occurs used for computing a valid settling time. This value is equivalent to the input parameter, D, which you can set when you run the settlingtime function. The settling time is displayed in the Overshoots/Undershoots pane.

The Transitions pane displays calculated measurements associated with the input signal changing between its two possible state level values, high and low. The Transition measurements assume that the amplitude of the input signal is in units of volts. Convert all input signals to volts for the Transition measurements to be valid.

A positive-going transition, or rising edge, in a bilevel waveform is a transition from the low-state level to the high-state level. A positive-going transition has a slope value greater than zero. Whenever there is a plus sign (+) next to a text label, this symbol refers to measurement associated with a rising edge, a transition from a low-state level to a high-state level.

A negative-going transition, or falling edge, in a bilevel waveform is a transition from the high-state level to the low-state level. A negative-going transition has a slope value less than zero. Whenever there is a minus sign (–) next to a text label, this symbol refers to measurement associated with a falling edge, a transition from a high-state level to a low-state level.

  • High — The high-amplitude state level of the input signal over the duration of the Time Span parameter. You can set Time Span in the Main pane of the Visuals—Time Domain Properties dialog box. For more information on the algorithm this measurement uses, see the Signal Processing Toolbox statelevels function reference.

  • Low — The low-amplitude state level of the input signal over the duration of the Time Span parameter. You can set Time Span in the Main pane of the Visuals—Time Domain Properties dialog box. For more information on the algorithm this measurement uses, see the Signal Processing Toolbox statelevels function reference.

  • Amplitude — Difference in amplitude between the high-state level and the low-state level.

  • + Edges — Total number of positive-polarity, or rising, edges counted within the displayed portion of the input signal.

  • + Rise Time — Average amount of time required for each rising edge to cross from the lower-reference level to the upper-reference level. For more information on the algorithm this measurement uses, see the Signal Processing Toolbox risetime function reference.

  • + Slew Rate — Average slope of each rising-edge transition line within the upper- and lower-percent reference levels in the displayed portion of the input signal. The region in which the slew rate is calculated appears in gray.

    For more information on the algorithm this measurement uses, see the Signal Processing Toolbox slewrate function reference.

  • – Edges — Total number of negative-polarity or falling edges counted within the displayed portion of the input signal.

  • – Fall Time — Average amount of time required for each falling edge to cross from the upper-reference level to the lower-reference level. For more information on the algorithm this measurement uses, see the Signal Processing Toolbox falltime function reference.

  • – Slew Rate — Average slope of each falling edge transition line within the upper- and lower-percent reference levels in the displayed portion of the input signal. For more information on the algorithm this measurement uses, see the Signal Processing Toolbox slewrate function reference.

The Overshoots/Undershoots pane displays calculated measurements involving the distortion and damping of the input signal. Overshoot and undershoot refer to the amount that a signal, respectively, exceeds and falls below its final steady-state value. Preshoot refers to the amount before a transition that a signal varies from its initial steady-state value. This figure shows preshoot, overshoot, and undershoot for a rising-edge transition.

 Overshoot/Undershoot Plot

  • + Preshoot — Average lowest aberration in the region immediately preceding each rising transition.

  • + Overshoot — Average highest aberration in the region immediately following each rising transition. For more information on the algorithm this measurement uses, see the Signal Processing Toolbox overshoot function reference.

  • + Undershoot — Average lowest aberration in the region immediately following each rising transition. For more information on the algorithm this measurement uses, see the Signal Processing Toolbox undershoot function reference.

  • + Settling Time — Average time required for each rising edge to enter and remain within the tolerance of the high-state level for the remainder of the settle seek duration. The settling time is the time after the mid-reference level instant when the signal crosses into and remains in the tolerance region around the high-state level. This crossing is illustrated in the following figure.

     Settling Time Plot

    You can modify the settle seek duration parameter in the Settings pane. For more information on the algorithm this measurement uses, see the Signal Processing Toolbox settlingtime function reference.

  • – Preshoot — Average highest aberration in the region immediately preceding each falling transition.

  • – Overshoot — Average highest aberration in the region immediately following each falling transition. For more information on the algorithm this measurement uses, see the Signal Processing Toolbox overshoot function reference.

  • – Undershoot — Average lowest aberration in the region immediately following each falling transition. For more information on the algorithm this measurement uses, see the Signal Processing Toolbox undershoot function reference.

  • – Settling Time — Average time required for each falling edge to enter and remain within the tolerance of the low-state level for the remainder of the settle seek duration. The settling time is the time after the mid-reference level instant when the signal crosses into and remains in the tolerance region around the low-state level. You can modify the settle seek duration parameter in the Settings pane. For more information on the algorithm this measurement uses, see the Signal Processing Toolbox settlingtime function reference.

The Cycles pane displays calculated measurements of to repetitions or trends in the displayed portion of the input signal.

  • Period — Average duration between adjacent edges of identical polarity within the displayed portion of the input signal. The Bilevel measurements panel calculates period as follows. It takes the difference between the mid-reference level instants of the initial transition of each positive-polarity pulse and the next positive-going transition. These mid-reference level instants appear as red dots.

    For more information on the algorithm this measurement uses, see the Signal Processing Toolbox pulseperiod function reference.

  • Frequency — Reciprocal of the average period. Whereas period is typically measured in some metric form of seconds, or seconds per cycle, frequency is typically measured in hertz or cycles per second.

  • + Pulses — Number of positive-polarity pulses counted.

  • + Width — Average duration between rising and falling edges of each positive-polarity pulse within the displayed portion of the input signal. For more information on the algorithm this measurement uses, see the Signal Processing Toolbox pulsewidth function reference.

  • + Duty Cycle — Average ratio of pulse width to pulse period for each positive-polarity pulse within the displayed portion of the input signal. For more information on the algorithm this measurement uses, see the Signal Processing Toolbox dutycycle function reference.

  • – Pulses — Number of negative-polarity pulses counted.

  • – Width — Average duration between rising and falling edges of each negative-polarity pulse within the displayed portion of the input signal. For more information on the algorithm this measurement uses, see the Signal Processing Toolbox pulsewidth function reference.

  • – Duty Cycle — Average ratio of pulse width to pulse period for each negative-polarity pulse within the displayed portion of the input signal. For more information on the algorithm this measurement uses, see the Signal Processing Toolbox dutycycle function reference.

Peak Finder Panel

The Peak Finder panel displays the maxima, showing the x-axis values at which they occur. This panel allows you to modify the settings for peak threshold, maximum number of peaks, and peak excursion. You can choose to hide or display the Peak Finder panel. In the scope menu, select Tools > Measurements > Peak Finder. Alternatively, in the scope toolbar, select the Peak Finder button.

The Peak finder panel is separated into two panes, labeled Settings and Peaks. You can expand each pane to see the available options.

The Settings pane enables you to modify the parameters used to calculate the peak values within the displayed portion of the input signal. For more information on the algorithms this pane uses, see the Signal Processing Toolbox findpeaks function reference.

  • Peak Threshold — The level above which peaks are detected. This setting is equivalent to the MINPEAKHEIGHT parameter, which you can set when you run the findpeaks function.

  • Max Num of Peaks — The maximum number of peaks to show. The value you enter must be a scalar integer from 1 through 99. This setting is equivalent to the NPEAKS parameter, which you can set when you run the findpeaks function.

  • Min Peaks Distance — The minimum number of samples between adjacent peaks. This setting is equivalent to the MINPEAKDISTANCE parameter, which you can set when you run the findpeaks function.

  • Peak Excursion — The minimum height difference between a peak and its neighboring samples The peak excursion setting is equivalent to the THRESHOLD parameter, which you can set when you run the findpeaks function.

  • Label Format — The coordinates to display next to the calculated peak values on the plot. To see peak values, expand the Peaks pane and select the check boxes associated with individual peaks of interest. By default, both x-axis and y-axis values are displayed on the plot. Select which axes values you want to display next to each peak symbol on the display.

    • X+Y — Display both x-axis and y-axis values.

    • X — Display only x-axis values.

    • Y — Display only y-axis values.

The Peaks pane displays all of the largest calculated peak values. It also shows the coordinates at which the peaks occur, using the parameters you define in the Settings pane. You set the Max Num of Peaks parameter to specify the number of peaks shown in the list.

The numerical values displayed in the Value column are equivalent to the pks output argument returned when you run the findpeaks function. The numerical values displayed in the second column are similar to the locs output argument returned when you run the findpeaks function.

The Peak Finder displays the peak values in the Peaks pane. By default, the Peak Finder panel displays the largest calculated peak values in the Peaks pane in decreasing order of peak height. Use the sort descending button ( ) to rearrange the category and order by which Peak Finder displays peak values. Click this button again to sort the peaks in ascending order instead. When you do so, the arrow changes direction to become the sort ascending button ( ). A filled sort button indicates that the peak values are currently sorted in the direction of the button arrow. If the sort button is not filled ( ), then the peak values are sorted in the opposite direction of the button arrow. The Max Num of Peaks parameter still controls the number of peaks listed.

Use the check boxes to control which peak values are shown on the display. By default, all check boxes are cleared and the Peak Finder panel hides all the peak values. To show all the peak values on the display, select the check box in the top-left corner of the Peaks pane. To hide all the peak values on the display, clear this check box. To show an individual peak, select the check box directly to the left of its Value listing. To hide an individual peak, clear the check box directly to the left of its Value listing.

The Peaks are valid for any units of the input signal. The letter after the value associated with each measurement indicates the abbreviation for the appropriate International System of Units (SI) prefix, such as m for milli-. For example, if the input signal is measured in volts, an m next to a measurement value indicates that this value is in units of millivolts.

Visuals — Time Domain Options

The Visuals — Time Domain Properties dialog box controls the visual configuration settings of the Signal Browser display. From the menu, select View > Configuration Properties to open this dialog box.

Main Pane

The Main pane of the Visuals — Time Domain Properties dialog box appears as follows.

Time units

Specify the units used to describe the time-axis. The default setting is Metric. You can select one of the following options.

  • Metric — In this mode, the Signal Browser converts the times on the time-axis to some metric units such as milliseconds, microseconds, days, etc. The Signal Browser chooses the appropriate metric units, based on the minimum time-axis limit and the maximum time-axis limit of the window.

  • Seconds — In this mode, the Signal Browser always displays the units on the time-axis as seconds.

  • None — In this mode, the Signal Browser displays no units on the time-axis. The Signal Browser shows only the word Time on the time-axis.

Time-axis labels

Specify how to display the time units used to describe the time-axis. The default setting is All. You can select one of the following options.

  • All — In this mode, the time-axis labels appear in all displays.

  • None — In this mode, the time-axis labels do not appear in the displays.

  • Bottom Displays Only — In this mode, the time-axis labels appear only in the bottom row of the displays.

Show time-axis label

Select to turn on time-axis label display.

Maximize axes

Specify whether to display the Signal Browser in maximized axes mode. In this mode, each of the axes is expanded to fit into the entire display. In each display, there is no space to show labels. Tick mark values are shown on top of the plotted data. The default setting is Auto. You can select one of the following options:

  • Auto — In this mode, the axes appear maximized in all displays only if the Title and Y-Axis label parameters are empty for every display. If you enter any value in any display for either of these parameters, the axes are not maximized.

  • On — In this mode, the axes appear maximized in all displays. Any values entered into the Title and Y-Axis label parameters are hidden.

  • Off — In this mode, none of the axes appear maximized.

Display Pane

The Display pane of the Visuals — Time Domain Properties dialog box appears as follows.

Active display

Specify the active display as an integer to get and set relevant properties. The number of a display corresponds to its column-wise placement index. Set this property to control which display has its axes colors, line properties, marker properties, and visibility changed.

When you use the Layout option to tile the window into multiple displays, the display highlighted in blue is referred to as the active display. The default setting is 1.

Title

Specify the active display title as a string. By default, the active display has no title.

Show legend

Select this check box to show the legend in the display. The channel legend displays a name for each channel of each input signal. When the legend appears, you can place it anywhere inside of the scope window. To turn off the legend, clear the Show legend check box. This parameter applies only when the Spectrum Type is Power or Power density.

You can edit the name of any channel in the legend. To do so, double-click the current name, and enter a new channel name. By default, if the signal has multiple channels, the scope uses an index number to identify each channel of that signal. To change the appearance of any channel of any input signal in the scope window, from the scope menu, select View > Style.

Show grid

When you select this check box, a grid appears in the display of the scope figure. To hide the grid, clear this check box.

Plot signals as magnitude and phase

When you select this check box, the scope splits the display into a magnitude plot and a phase plot. By default, this check box is cleared. If the input signal has complex values, the scope plots the real and imaginary portions on the same axes. These real and imaginary portions appear as different-colored lines on the same axes, as shown in the following figure.

Selecting this check box and clicking the Apply or OK button changes the display. The magnitude of the input signal appears on the top axes and its phase, in degrees, appears on the bottom axes. See the following figure.

This feature is useful for complex-valued input signals. If the input is a real-valued signal, selecting this check box returns the absolute value of the signal for the magnitude. The phase is 0 degrees for nonnegative input and 180 degrees for negative input.

Y-limits (Minimum)

Specify the minimum value of the y-axis.

When you select the Plot signal(s) as magnitude and phase check box, the value of this property always applies to the magnitude plot on the top axes. The phase plot on the bottom axes is always limited to a minimum value of -180 degrees.

Y-limits (Maximum)

Specify the maximum value of the y-axis.

When you select the Plot signal(s) as magnitude and phase check box, the value of this property always applies to the magnitude plot on the top axes. The phase plot on the bottom axes is always limited to a maximum value of 180 degrees.

Y-label

Specify as a string the text for the scope to display to the left of the y-axis.

This property becomes invisible when you select the Plot signal(s) as magnitude and phase check box. When you enable that property, the y-axis label always appears as Magnitude on the top axes and Phase on the bottom axes.

Style Dialog Box

In the Style dialog box, you can customize the style of displays. You can change the color of the figure containing the displays, the background and foreground colors of display axes, and properties of lines in a display. From the Signal Browser menu, select View > Style to open this dialog box.

Properties

The Style dialog box allows you to modify the following properties of the Signal Browser:

Figure color

Specify the color that you want to apply to the background of the Signal Browser. By default, the figure color is gray.

Plot type

Specify the type of plot to use. The default setting is Line. Valid values for Plot type are:

  • Line — Displays input signal as lines connecting each of the sampled values. This approach is similar to the functionality of the MATLAB line or plot function.

  • Stairs — Displays input signal as a stairstep graph. A stairstep graph is made up of only horizontal lines and vertical lines. Each horizontal line represents the signal value for a discrete sample period and is connected to two vertical lines. Each vertical line represents a change in values occurring at a sample. This approach is equivalent to the MATLAB stairs function. Stairstep graphs are useful for drawing time history graphs of digitally sampled data.

Select display

Specify the active display as a number, where a display number corresponds to the index of the input signal. The number of a display corresponds to its column-wise placement index. The default setting is 1. Set this parameter to control which display should have its axes colors, line properties, marker properties, and visibility changed.

Axes colors

Specify the color that you want to apply to the background of the axes for the active display.

Properties for line

Specify the signal for which you want to modify the visibility, line properties, and marker properties.

Visible

Specify whether the selected signal on the active display should be visible. If you clear this check box, the line disappears.

Line

Specify the line style, line width, and line color for the selected signal on the active display.

Marker

Specify marks for the selected signal on the active display to show at data points. This parameter is similar to the Marker property for the MATLAB Handle Graphics® plot objects. You can choose any of the marker symbols from the following table.

SpecifierMarker Type
noneNo marker (default)
Circle
Square
Cross
Point
Plus sign
Asterisk
Diamond
Downward-pointing triangle
Upward-pointing triangle
Left-pointing triangle
Right-pointing triangle
Five-pointed star (pentagram)
Six-pointed star (hexagram)

Filter Design and Analysis Tool

The Filter Design and Analysis Tool fdatool allows you to design and edit FIR and IIR filters. To launch fdatool, press either the New button or the Edit button under the Filters list box in SPTool.

    Note   When you open FDATool from SPTool, a reduced version of FDATool that is compatible with SPTool opens.

The Filter Design and Analysis Tool has a Pole/Zero Editor you can access by selecting the icon in the left column of FDATool.

Filter Visualization Tool

The Filter Visualization Tool (fvtool) allows you to view the characteristics of a designed or imported filter, including its magnitude response, phase response, group delay, phase delay, pole-zero plot, impulse response, and step response. To activate FVTool, click the View button under the Filters list box in SPTool.

Spectrum Viewer

The Spectrum Viewer allows you to analyze frequency-domain data graphically using a variety of methods of spectral density estimation, including the Burg method, the FFT method, the multitaper method, the MUSIC eigenvector method, Welch's method, and the Yule-Walker autoregressive method. To activate the Spectrum Viewer:

  • Click the Create button under the Spectra list box to compute the power spectral density for a signal selected in the Signals list box in SPTool. You may need to click Apply to view the spectra.

  • Click the View button to analyze spectra selected under the Spectra list box in SPTool.

  • Click the Update button under the Spectra list box in SPTool to modify a selected power spectral density signal.

In addition, you can right-click in any plot display area to modify signal properties.

Was this topic helpful?