Skip to Main Content Skip to Search
Product Documentation

Detect Change - Detect change in signal value

Library

Logic and Bit Operations

Description

The Detect Change block determines if an input does not equal its previous value.

Data Type Support

The Detect Change block accepts signals of the following data types:

For more information, see Data Types Supported by Simulink in the Simulink documentation.

Parameters and Dialog Box

Initial condition

Set the initial condition for the previous input U/z.

Input processing

Specify whether the block performs sample- or frame-based processing. You can select one of the following options:

  • Elements as channels (sample based) — Treat each element of the input as a separate channel (sample-based processing).

  • Columns as channels (frame based) — Treat each column of the input as a separate channel (frame-based processing).

      Note   Frame-based processing requires a DSP System Toolbox license.

      For more information, see Sample- and Frame-Based Concepts in the DSP System Toolbox documentation.

  • Inherited — Inherit the processing mode from the input signal and delay the input accordingly. You can identify whether the input signal is sample or frame based by looking at the signal line. Simulink represents sample-based signals with a single line and frame-based signals with a double line.

      Note   When you choose the Inherited option for the Input processing parameter, and the input signal is frame-based, Simulink® will generate a warning or error in future releases.

Use Input processing to specify whether the block performs sample- or frame-based processing. The block accepts frame-based signals for the input u. All other input signals must be sample based.

Input Signal uInput Processing ModeBlock Works?
Sample basedSample basedYes
Frame basedNo, produces an error
Sample basedFrame basedYes
Frame basedYes
Sample basedInheritedYes
Frame basedYes

For more information about these two processing modes, see Sample- and Frame-Based Concepts in the DSP System Toolbox documentation.

Output data type

Set the output data type to uint8 or boolean.

Characteristics

Direct Feedthrough

Yes

Scalar Expansion

Yes

See Also

Detect Decrease, Detect Fall Negative, Detect Fall Nonpositive, Detect Increase, Detect Rise Nonnegative, Detect Rise Positive

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS