Simulink Reference Previous page   Next Page
Difference

Calculate the change in a signal over one time step

Library

Discrete

Description

The Difference block outputs the current input value minus the previous input value.

Data Type Support

The Difference block accepts signals of any data type supported by Simulink, including fixed-point data types.

Parameters and Dialog Box

The Main pane of the Difference block dialog appears as follows:

Initial condition for previous output
Set the initial condition for the previous output.

The Signal data types pane of the Difference block dialog appears as follows:

Output data type and scaling
Specify the output data type and scaling via the dialog box, or inherit the data type and scaling from an internal rule or by backpropagation.
Output data type
Set the output data type. This parameter is only visible if you select Specify via dialog for the Output data type and scaling parameter.
Output scaling
Set the output scaling using either binary point-only or [Slope Bias] scaling. This parameter is only visible if you select Specify via dialog for the Output data type and scaling parameter.
Lock output scaling so autoscaling tool can't change it
If you select this check box, the output scaling is locked.
Round toward
Rounding mode for the fixed-point output.
Saturate to max or min when overflows occur
If selected, fixed-point overflows saturate.

Characteristics

Direct Feedthrough
Yes
Scalar Expansion
Yes, of inputs and gain


Previous page  Detect Rise Positive Digital Clock Next page

© 1994-2005 The MathWorks, Inc.