Main Content

Work with Basic Signal Data

Create Signals and Signal Data

In theSignal Editortab, create signal data either from existing model data (scenarios) or start with an empty scenario. By default, Signal Editor creates data intimeseriesformat. To a scenario, add signals and data by:

After inserting the signal, view, plot, and edit the data by clicking thePlot/Editcheck box. The plot opens in theEdittab.

If the data does not plot as expected, use theFit to windowbutton in theZoom & Pansection. For multidimensional signals, also make sure that you have the right plot selected for the column data you are editing.

Explore the plots using theMeasureandZoom & Pansections on the toolbar.

  • In theMeasuresection, use theData Cursorsbutton to display one or two cursors for the plot. These cursors display the T and Y values of a data point in the plot. To view a data point, click a point on the plot line.

  • In theZoom & Pansection, select how you want to zoom and pan the signal plots. Zooming is only for the selected axis.

Work with Basic Signal Data with a Tabular Editor

添加和编辑基本信号数据,选择一个信号and click the associatedPlot/Editcheck box. TheEdittab opens with a plot of the signal. Each data point in the signal is demarcated with a circle (marker), which you can toggle off and on through the context menuShow>Toggle Markersoption. Under the signal plot is a tabular editor.

  • To insert or delete a data row for a signal, useor, respectively.

  • To change the data type for signal data, select the type from the drop-down.

  • To change the time or data for each signal, edit the associated column of the data row, then click anywhere in the canvas to update the plot of the signal. You may need to clickFit to Viewin the toolstrip to adjust the plot axes.

    Note

    If the data is fixed-point data, hovering over the data in the table displays a summary of the data

    • Ideal Value — Requested value.

    • Fixed-Point Value — Value resulting from casting the ideal value as a fixed-point value.

    • Absolute Error — Absolute error of value.

    • Relative Error — Difference between cast value and the original value.

    • Additional error information, such as whether the error is an overflow or underflow.

  • To change the size of the plot or tabular area, move the separator up and down.

  • To evaluate MATLAB®expressions in table cells, type them in a table cell:

    • The expression must be a valid MATLAB syntax.

    • The result of the syntax must be a scalar value.

    • The result of the syntax must a valid value based on the signal properties such as data type and complexity.

    Expressions can access variables in the base workspace. If an expression does not satisfy these guidelines, Simulink®reverts the cell entry to the original value.

  • To create multidimensional signals, use one of these methods. For more information, seeAdd and Edit Multidimensional Signals.

    • In the Default Properties for Insertion dialog box, enter a dimension greater than1in theDimensionsparameter.

    • In the Author and Insert dialog box, enter a MATLAB expression that creates multidimensional signals in theDataparameter

  • You can now navigate through the Signal Editor user interface tabular area usingTabandCtrl+Tab.

    1. In the Signal Editor tabular area, enter the cell edit mode of the tabular area by either

      1. Double-clicking a table cell

      2. Pressing theEnterkey

      When cell edit mode is enabled, the resulting cell is white and outlined in blue:

      Signal Editor enabled cell

    2. To navigate forward through the table, pressTab.

    3. To navigate backward through the table, pressShift+Tab.

Instead of using the tabular editor to define signal data, you can use MATLAB expressions.

See Also

|

Related Topics