Documentation

Signal Editor

Display, create, edit, and switch interchangeable scenarios

  • Library:
  • Sources

Description

The Signal Editor block displays, creates, and edits interchangeable scenarios. You can also use the block to switch scenarios in and out of models.

The Signal Editor block supports MAT-files that contain one or more scalar Simulink.SimulationData.Dataset objects.

Limitations

The Signal Editor block does not support:

  • Function-calls

  • Array of buses

  • Buses while using Rapid Accelerator mode

  • timetable objects

  • Ground signals

Ports

Output Arguments

expand all

One or more signals, which can be:

  • A MATLAB® timeseries object

  • A structure of MATLAB timeseries objects

  • A two-dimensional matrix

Data Types: single | double | int8 | int16 | int32 | uint8 | uint16 | uint32 | Boolean | fixed point | enumerated | bus

Parameters

expand all

Data set file, specified as character vector, containing one or more scalar Simulink.SimulationData.Dataset objects. Do not use a file name from one locale in a different locale.

Dependencies

If untitled.mat does not exist in the current folder, these parameters are disabled:

  • Active scenario

  • Signals

  • Output a bus signal

  • Unit

  • Sample time

  • Interpolate data

  • Enable zero-crossing detection

  • Form output after final data value by

To create a MAT-file, click . This button starts the Signal Editor user interface, which lets you to create and edit scenario MAT-files.

Active scenario, specified as a character vector. The specified MAT-file must exist.

Dependencies

To enable this parameter, ensure that the specified MAT-file exists.

To start Signal Editor user interface, click .

Signal to configure, specified as a signal name. This signal is considered the active signal. The MAT-file must exist before you can configure signals.

Dependencies

To enable this parameter, ensure that the specified MAT-file exists.

Configure signal as a bus:

On

Configure signal as a bus.

Off

Do not configure signal as a bus.

The specified MAT-file must exist.

Dependencies

  • Selecting Output a bus signal check box enables the Select bus object parameter.

  • To enable this parameter, ensure that the specified MAT-file exists.

Select the bus object name. To edit the bus object or create a bus object using the Data Type Assistant, click >>. The specified MAT-file must exist.

Dependencies

To enable this parameter, ensure that the specified MAT-file exists.

Select the bus object name. If you do not have a bus object, create one by clicking Edit, which starts the Bus Editor. For more information, see Create Bus Objects with the Bus Editor.

Physical unit of the signal, specified as an allowed unit. To specify a unit, begin typing in the text box. As you type, the parameter displays potential matching units. For more information, see Unit Specification in Simulink Models. For a list of supported units, see Allowed Unit Systems.

To constrain the unit system, click the link to the right of the parameter:

  • If a Unit System Configuration block exists in the component, its dialog box opens. Use that dialog box to specify allowed and disallowed unit systems for the component.

  • If a Unit System Configuration block does not exist in the component, the model Configuration Parameters dialog box displays. Use that dialog box to specify allowed and disallowed unit systems for the model.

The specified MAT-file must exist.

Dependencies

To enable this parameter, ensure that the specified MAT-file exists.

Time interval between samples, specified in seconds. The specified MAT-file must exist.

Dependencies

To enable this parameter, ensure that the specified MAT-file exists.

Linearly interpolate data at time hits for which no corresponding workspace data exist. The specified MAT-file must exist.

The Signal Editor block linearly interpolates:

On

Linearly interpolate at time hits for which no corresponding workspace data exist, select this option.

Off

The current output equals the output at the most recent time for which data exists.

The Signal Editor block interpolates by using the two corresponding workspace samples:

  • For double data, linearly interpolates the value by using the two corresponding samples

  • For Boolean data, uses false for the first half of the time between two time values and true for the second half

  • For a built-in data type other than double or Boolean:

    • Upcasts the data to double

    • Performs linear interpolation (as described for double data)

    • Downcasts the interpolated value to the original data type

You cannot use linear interpolation with enumerated (enum) data.

The block uses the value of the last known data point as the value of time hits that occur after the last known data point.

To determine the block output after the last time hit for which data is available, combine the settings of these parameters:

  • Interpolate data

  • Form output after final data value by

For details, see the Form output after final data value by parameter.

Dependencies

To enable this parameter, ensure that the specified MAT-file exists.

If you select the Enable zero-crossing detection parameter, then when the input array contains multiple entries for the same time hit, Simulink® detects a zero crossing. For example, suppose that the input array has this data:

time:     0 1 2 2 3
signal:   2 3 4 5 6

At time 2, there is a zero crossing from input signal discontinuity. For more information, see Zero-Crossing Detection.

For bus signals, Simulink detects zero crossings across all leaf bus elements.

The specified MAT-file must exist.

Dependencies

To enable this parameter, ensure that the specified MAT-file exists.

To determine the block output after the last time hit for which workspace data is available, combine the settings of these parameters:

  • Interpolate data

  • Form output after final data value by

This table lists the block output, based on the values of the two options.

Setting for Form Output After Final Data Value BySetting for Interpolate DataBlock Output After Final Data

Extrapolation

On

Extrapolated from final data value

Off

Error

Setting to zero

On

Zero

Off

Zero

Holding final value

On

Final value from workspace

Off

Final value from workspace

For example, the block uses the last two known data points to extrapolate data points that occur after the last known point if you:

  • Select Interpolate data.

  • Set Form output after final data value by to Extrapolation.

The specified MAT-file must exist.

Dependencies

To enable this parameter, ensure that the specified MAT-file exists.

Introduced in R2017b

Was this topic helpful?