Skip to Main Content Skip to Search
Product Documentation

systest.signals.segments - Contain supported segment types for creating signals

Syntax

segment = systest.signals.segments.(segment_type)

Description

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:

Examples

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)

How To

  


Recommended Products

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