| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Simulink |
| Contents | Index |
| Learn more about Simulink |
Discrete

The Discrete Derivative block computes an optionally scaled discrete time derivative as follows
![]()
where
and
are
the block's input and output at the current time step, respectively,
is
the block's input at the previous time step,
is
a scaling factor, and
is
the simulation's discrete step size, which must be fixed.
When you use the Discrete Derivative block in triggered subsystems, follow these guidelines:
When the Sample time type parameter of the trigger port is triggered, verify that your model does not trigger the subsystem at the first time step.
If your model triggers the subsystem at the first time step, the Discrete Derivative block generates a divide-by-zero warning message. This behavior occurs because the time step at t = 0 is zero.
When the Sample time type parameter of the trigger port is periodic, your model can trigger the subsystem at any time step.
The Discrete Derivative block supports all numeric Simulink data types, including fixed-point data types.
For a discussion on the data types supported by Simulink software, see Data Types Supported by Simulink.
The Main pane of the Discrete Derivative block dialog box appears as follows:

Scaling factor used to weight the block's input at the current time step.
Set the initial condition for the previous scaled input.
The Signal Attributes pane of the Discrete Derivative block dialog box appears as follows:

Specify the minimum value that the block should output. The default value, [], is equivalent to -Inf. Simulink software uses this value to perform:
Simulation range checking (see Checking Signal Ranges)
Automatic scaling of fixed-point data types
Specify the maximum value that the block should output. The default value, [], is equivalent to Inf. Simulink software uses this value to perform:
Simulation range checking (see Checking Signal Ranges)
Automatic scaling of fixed-point data types
Specify the output data type. You can set it to:
A rule that inherits a data type, for example, Inherit: Inherit via back propagation
The name of a built-in data type, for example, single
The name of a data type object, for example, a Simulink.NumericType object
An expression that evaluates to a data type, for example, fixdt(1,16,0)
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.
Select to lock the output data type setting of this block against changes by the Fixed-Point Tool and the Fixed-Point Advisor. For more information, see Fixed-Point Tool and Fixed-Point Advisor in the Simulink Fixed Point documentation.
Select the rounding mode for fixed-point operations. For more information, see Rounding in the Simulink Fixed Point User's Guide.
If selected, fixed-point overflows saturate. Otherwise, they wrap.
Direct Feedthrough | Yes |
Scalar Expansion | Yes, of inputs and gain |
![]() | Direct Lookup Table (n-D) | Discrete Filter | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |