createSampleTime
Class: matlab.System
Create sample time specification object
Syntax
sts = createSampleTime(obj)
sts = createSampleTime(obj,'Type',Type)
sts = createSampleTime(obj,'Type',Type,Name,Value)
Description
creates a sample time specification object for inherited sample time for the System object™
sts
= createSampleTime(obj
)obj
. Use this sample time specification object in the getSampleTimeImpl
method of your System object. The sample time specification affects the simulation time when the
System object is included in a MATLAB System block. If you do not include
this method in your System object definition, the sample time is inherited.
creates a sample time specification object with the specified sample time type. sts
= createSampleTime(obj
,'Type',Type
)
creates a sample time specification object with additional options specified by one or
more sts
= createSampleTime(obj
,'Type',Type
,Name,Value
)Name,Value
pair arguments. Name
is a
property name and Value
is the corresponding value.
Name
must appear inside quotes. You can specify several
name-value pair arguments in any order as
Name1,Value1,...,NameN,ValueN
.
Dependencies
You can only call createSampleTime
from the getSampleTimeImpl
method of your System object.
Input Arguments
Output Arguments
Examples
Version History
Introduced in R2017b
See Also
getCurrentTime
(Simulink) | getSampleTime
(Simulink) | getSampleTimeImpl
(Simulink) | setNumTicksUntilNextHit
(Simulink)