Specify sample time type, offset time, and sample time
sts = getSampleTimeImpl(obj)
returns the sample time
specification created within the method body,
sts = getSampleTimeImpl(
sts, for the System
obj. Specify the sample time specification within the body of
getSampleTimeImpl by calling
createSampleTime. The sample time
specification affects the simulation time when the System
object is included in a MATLAB System block.
This method is called during setup by
obj— System object
System object for which you want to specify the sample time.
sts— Sample time specification object
An object defining the sample time specification values. You create this object with the
Specify that the MATLAB System block should inherit the sample from upstream blocks.
function sts = getSampleTimeImpl(obj) sts = createSampleTime(obj,'Type','Inherited'); end
Specify a discrete sample time for the MATLAB System block.
function sts = getSampleTimeImpl(obj) sts = createSampleTime(obj,'Type','Discrete',... 'SampleTime',10.2,'OffsetTime',0.5); end