getPrevious, prev
Description
returns the value of the data at the previous time step. This operator works only in the
Requirements
Table block.z
= getPrevious(u
)
is an
alternative way to execute z
= prev(u
)getPrevious(u)
.
Input Arguments
Output Arguments
Examples
Tips
If
getPrevious
attempts to return the value of the data at a time step when it was not defined, it returns an undefined value. For example, data is not defined before the simulation time is0
. For this situation, use theisStartup
operator to define additional requirements at a simulation time of0
and~isStartup
at the other time steps.You can use this operator only in the Requirements tab.
Version History
Introduced in R2022a