| Contents | Index |
segment = systest.signals.segments.(segment_type)
segment = systest.signals.segments.(segment_type) creates a signal with a segment of type segment_type.
The following segment types can be used on the systest.signals.segments function:
Constant – A segment with a constant value.
Properties include:
Duration – The length in seconds of the segment.
Value – The constant value of the segment.
Custom – A segment with user-specified time and data vectors.
Properties include:
Data – User-specified data vector for each time point.
Time – User-specified time vector for each point.
Duration – The length in seconds of the segment.
Pulse – A segment with a Pulse value.
Properties include:
Duration – The length in seconds of the segment.
InitialValue – The value of the segment before the pulse.
Offset – The length in seconds before the pulse begins.
FinalValue – The value of the segment during the pulse.
PulseWidth – The length in seconds of the pulse.
Ramp – A segment with a linearly changing value.
Properties include:
Duration – The length in seconds of the segment.
FinalValue – The value the segment finishes at.
InitialValue – The value the segment starts at.
Offset – The time in seconds before the ramp starts changing.
Slope – The rate of change between InitialValue and FinalValue.
Sine – A periodic sine wave.
Properties include:
Amplitude – The amplitude of the sine wave.
Duration – The length in seconds of the segment.
InitialValue – The vertical offset of the sine wave.
PeriodLength – The length of time in seconds for a full period.
PhaseShift – The amount in degrees started into the first period.
SampleRate – The amount in seconds between each sampled point.
Square – A periodic series of pulses.
Properties include:
Amplitude – The amplitude of the square wave.
Duration – The length in seconds of the segment.
DutyCycle – The percentage of time the wave has positive amplitude.
InitialValue – The vertical offset of the square wave.
PeriodLength – The length of time in seconds for a full period.
PhaseShift – The amount in degrees started into the first period.
Step – A segment that transitions from a one value to another.
Properties include:
Duration – The length in seconds of the segment.
FinalValue – The value of the segment after Offset.
InitialValue – The value the segment before Offset.
Offset – The time in seconds before the step occurs.
Create a segment of type Constant, with no properties set.
segment = systest.signals.segments.Constant
Create a segment of type Constant with a value of 5.
segment = systest.signals.segments.Constant('Value', 5)Create a segment of type Custom with a time of 0:99 and data of rand(1,100).
segment = systest.signals.segments.Custom('Time', 0:99, 'Data', rand(1,100))Create a segment of type Pulse with an offset of 3 and a FinalValue of 2.
segment = systest.signals.segments.Pulse('Offset', 3, 'FinalValue', 2)Create a segment of type Ramp with an offset of 2 and a FinalValue of 12.
segment = systest.signals.segments.Ramp('Offset', 2, 'FinalValue', 12)Create a segment of type Sine with an amplitude of 5.
segment = systest.signals.segments.Sine('Amplitude', 5)Create a segment of type Square with an amplitude of 5.
segment = systest.signals.segments.Square('Amplitude', 5)Create a segment of type Step with an InitialValue of 4.
segment = systest.signals.segments.Step('InitialValue', 4)

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |