Difference - Calculate change in 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® software, 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 Attributes pane of the Difference block dialog appears as follows:

Output minimum

Specify the minimum value that the block should output. The default value, [], is equivalent to -Inf. Simulink software uses this value to perform:

Output maximum

Specify the maximum value that the block should output. The default value, [], is equivalent to Inf. Simulink software uses this value to perform:

Output data type

Specify the output data type. You can set it to:

Click the Show data type assistant button to display the Data Type Assistant, which helps you set the Output data type parameter.

See Specifying Block Output Data Types for more information.

Lock output scaling against changes by the autoscaling tool

Select to lock scaling of outputs. This parameter is visible only if you enter an expression for the Output data type parameter.

Round toward

Rounding mode for the fixed-point output. For more information, see Rounding in the Simulink® Fixed Point™ User's Guide.

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

  


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