Simulink Reference Previous page   Next Page
Memory

Output the input from the previous time step

Library

Discrete

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.

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

Initial condition
The output at the initial integration step. This must be set to 0 if the input data type is user-defined. Simulink does not allow the initial output of this block to be inf or NaN.
Inherit sample time
Check this check box to cause the sample time to be inherited from the driving block. If this option is not selected, the block's sample time depends on the type of solver used to simulate the model. If the solver is a variable-step solver, the sample time is zero-order-hold (ZOH) continuous. If the solver is a fixed-step solver, the sample time equals the solver's step size.
Direct feedthrough of input during linearization
Causes the block to output its input during linearization and trim. This sets the block's mode to direct feedthrough.
Enabling this check box can cause a change in the ordering of states in the model when using the functions linmod, dlinmod, or trim. To extract this new state ordering, use the following commands.
First compile the model using the following command, where model is the name of the Simulink model.

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

Direct Feedthrough
No, except when Direct feedthrough of input during linearization is enabled.
Sample Time
Continuous, but inherited from the driving block if you select the Inherit sample time check box
Scalar Expansion
Yes, of the Initial condition parameter
Dimensionalized
Yes
Zero Crossing
No


Previous page  Matrix Concatenation Merge Next page

© 1994-2005 The MathWorks, Inc.