Sample Time
The sample time of a block is a parameter that indicates when, during simulation, the block produces outputs and if appropriate, updates its internal state. The internal state includes but is not limited to continuous and discrete states that are logged. In engineering, sample time refers to the rate at which a discrete system samples its inputs. Simulink® allows you to model single-rate and multirate discrete systems and hybrid continuous-discrete systems through the appropriate setting of block sample times that control the rate of block execution (calculations).
Objects
simulink.sampletimecolors.Palette | Create custom sample time color palette for Simulink model (Since R2024b) |
simulink.sampletimecolors.storePalette | Add new simulink.sampletimecolors.Palette object to
preferences (Since R2024b) |
simulink.sampletimecolors.getPalette | Get available simulink.sampletimecolors.Palette
objects (Since R2024b) |
simulink.sampletimecolors.applyPalette | Apply sample time color palette to current MATLAB session (Since R2024b) |
simulink.sampletimecolors.removePalette | Remove simulink.sampletimecolors.Palette object from
preferences (Since R2024b) |
Functions
Simulink.BlockDiagram.getSampleTimes | Return all sample times associated with model |
Simulink.Block.getSampleTimes | Return sample time information for a block |
Classes
Simulink.SampleTime | Object containing sample time information |
Simulink.BlockPortData | Describe block input or output port |
Topics
- Types of Sample Time
How Simulink represents and categorizes sample times.
- Specify Sample Time
Specify and assess sample time information, programmatically and interactively.
- View Sample Time Information
How to access sample time information interactively.