| Simulink Reference | ![]() |
Output the input from the previous time 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 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
The Memory block accepts real or complex signals of any data type supported by Simulink, including fixed-point data types.
For a discussion of the data types supported by Simulink, refer to Data Types Supported by Simulink in the Using Simulink documentation.
Parameters and Dialog Box
inf or NaN.
linmod, dlinmod, or trim. To extract this new state ordering, use the following commands.
model is the name of the Simulink model.
[sizes, x0, x_str] = model([],[],[],'lincompile');
x_str, which is a cell array of the states in the Simulink model, contains the new state ordering. When passing a vector of states as input to the linmod, dlinmod, or trim functions, the state vector must use this new state ordering.
The State properties pane of this block pertains to code generation and has no effect on model simulation. See "Block States: Storing and Interfacing" in the Real-Time Workshop documentation for more information.
Characteristics
| Matrix Concatenation | Merge | ![]() |
© 1994-2005 The MathWorks, Inc.