Main Content

Simulink.sdi.useSignalColorForBaseline

Determine whether comparison plot uses baseline signal color and line style

Since R2020b

    Description

    Simulink.sdi.useSignalColorForBaseline(colorOption), where colorOption is true or 1, applies the same color and line style for the baseline signal in the Compare pane as in the Inspect pane. The default value for colorOption is false or 0, which uses the default solid line and dark blue color for the baseline signal in the comparison.

    Note

    The Simulation Data Inspector uses the color and line style of the baseline signal at the time of comparison. Any changes to signal colors made after comparing data are not reflected in the Compare pane.

    example

    baselineColor = Simulink.sdi.useSignalColorForBaseline returns 1 if the comparison uses the same color and line style for the baseline signal in the Compare pane as in the Inspect pane, or 0 if the comparison uses the default solid line and dark blue color for the baseline signal.

    example

    Examples

    collapse all

    By default, the Simulation Data Inspector uses a solid, dark blue line for the baseline signal in a comparison. To use the color and line style that the baseline signal has in the Inspect pane instead, use the Simulink.sdi.useSignalColorForBaseline function.

    Simulink.sdi.useSignalColorForBaseline(1)

    Use the Simulink.sdi.useSignalColorForBaseline function to determine whether the comparison uses the baseline signal color and line style or the default color and line style. For example, when the comparison uses the default solid, dark blue line for baseline signal, the Simulink.sdi.useSignalColorForBaseline function returns 0.

    baselineColor = Simulink.sdi.useSignalColorForBaseline
    baselineColor =
    
      logical
    
       0

    Input Arguments

    collapse all

    Baseline signal color option for comparison, specified as a numeric or logical 0 (false) or 1 (true).

    • 0 (false) — Comparison uses the default solid line and dark blue color for the baseline signal.

    • 1 (true) — Comparison uses the same color and line style for the baseline signal as in the Inspect pane.

    Output Arguments

    collapse all

    Baseline signal color and line style, returned as 0 or 1.

    • 0 — Comparison uses the default solid line and dark blue color for the baseline signal.

    • 1 — Comparison uses the same color and line style for the baseline signal as in the Inspect pane.

    Version History

    Introduced in R2020b