Using Simulink | ![]() ![]() |
Output the block input from the previous integration step.
Library
Description
The Memory block outputs its input from the previous time step, applying a one integration step sample-and-hold to its input signal.
This sample model (which, to provide more useful information, would be part of a larger model) demonstrates how to display the step size used in a simulation. The Sum block subtracts the time at the previous step, generated by the Memory block, from the current time, generated by the clock.
Note
Avoid using the Memory block when integrating with ode15s or ode113 , unless the input to the block does not change. |
Data Type Support
A Memory block accepts signals of any numeric type (complex or real) and data type, including user-defined types. If the input type is user-defined, the initial condition must be 0.
Parameters and Dialog Box
Characteristics
Direct Feedthrough |
No |
Sample Time |
Continuous, but inherited if the Inherit sample time check box is selected |
Scalar Expansion |
Of the Initial condition parameter |
Dimensionalized |
Yes |
Zero Crossing |
No |
![]() | Matrix Gain | Merge | ![]() |