MATLAB: Why we should use Zero Order Hold or Unit Delay before fuzzy block on simulink

unit delayzero order hold

when I don't use ZOH or unit delay, this system can't work correctly. An error occured, error: the sample time after propagation is [0,0]

Best Answer

The Zero-Order Hold block holds its input for the sample period you specify. The block accepts one input and generates one output. Each signal can be scalar or vector. If the input is a vector, the block holds all elements of the vector for the same sample period.
You specify the time between samples with the Sample time parameter. A setting of -1 means the block inherits the Sample time.
For your clear understanding... New Simulink model>>Create a SOURCE,ZOH,Unit Delay & Scope... Create scope axes properties to 3... Connect all & Run....