Main Content

StuckAtConstantAnomaly

R2026b

Synthetic stuck-at-constant anomaly model for validating anomaly detection models

Since R2026a

Description

Add-On Required: This feature requires the Time Series Anomaly Detection for MATLAB add-on.

The StuckAtConstantAnomaly object specifies the characteristics of an anomaly model that you can inject into a time series using injectAnomaly. This anomaly causes the time series to "stick" at a constant value for the duration of the anomaly. Name-value argument specifications in injectAnomaly determine the window location and length during which the anomaly occurs.

You create this model using syntheticAnomaly. StuckAtConstantAnomaly is one type of anomaly model in a set of anomaly objects that you can use to perturb a time series in multiple ways. You can then use this perturbed time series to help validate anomaly detection models against different anomaly types.

Plot of a stuck-at-constant anomaly within a ramp signal, as shown by a drop to a constant for a number of samples near the middle of the plot.

Properties

expand all

Type of constant determination, represented as "Random","Max", "Min", or "Custom".

The following list describes the sticking constant for each type, within the anomaly window that you specify to injectAnomaly.

  • "Random" — Stick at a random value within the window.

  • "Max" — Stick at the maximum value of the time series within the window.

  • "Min" — Stick at the minimum value of the time series within the window.

  • "Custom" — Directly specify the value at which the time series sticks.

Object Functions

injectAnomaly Inject anomalies defined by one or more anomaly models into a univariate time series

Version History

Introduced in R2026a