Main Content

Simulink.sdi.useSignalColorForCompareTo

Determine whether comparison plot uses comparison signal color and line style

Since R2020b

    Description

    Simulink.sdi.useSignalColorForCompareTo(colorOption), where colorOption is true or 1, applies the same color and line style for the comparison 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 orange color for the comparison signal in the comparison.

    Note

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

    example

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

    example

    Examples

    collapse all

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

    Simulink.sdi.useSignalColorForCompareTo(1)

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

    compareToColor = Simulink.sdi.useSignalColorForCompareTo
    compareTocolor =
    
      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 orange color for the comparison signal.

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

    Output Arguments

    collapse all

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

    • 0 — Comparison uses the default solid line and dark orange color for the comparison signal.

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

    Version History

    Introduced in R2020b