TrapezoidalSinePulse#
- class TrapezoidalSinePulse(options)#
Bases:
PartialPeriodicWaveformTrapezoidalSinePulsegenerates sine wave pulses with trapezoidal rise and fall transitions.Creates sine wave pulses with linear rise and fall transitions and a constant amplitude plateau during the periodic portion. Similar to
TrapezoidalPulsebut with sine wave modulation. Inherits fromPartialPeriodicWaveform.Example1:
% Create a trapezoidal sine pulse with rise and fall times pulse = TrapezoidalSinePulse(amplitude = 2.0, frequency = 1000, ... riseTime = 0.001, fallTime = 0.001); pulse.plot();
Example2:
% Create a pulse with only rise time pulse = TrapezoidalSinePulse(amplitude = 1.0, frequency = 500, riseTime = 0.002); pulse.plot();
- Constructor Summary
- TrapezoidalSinePulse(options)#
Construct a TrapezoidalSinePulse object.
- Parameters:
samplingRate (
double, optional) – Sampling rate in Hz (default: [])startTime (
double, optional) – Start time in seconds (default: 0)duration (
double, optional) – Duration in seconds (default: [])amplitude (
double, optional) – Peak-to-peak amplitude (default: [])offset (
double, optional) – DC offset (default: 0)frequency (
double, optional) – Frequency in Hz (default: [])phase (
double, optional) – Initial phase in radians (default: 0)riseTime (
double, optional) – Rise transition time in seconds (default: 0)fallTime (
double, optional) – Fall transition time in seconds (default: 0)
- Method Summary
- TimeFunc()#
Get the time function for the trapezoidal sine pulse.
Creates a function handle that generates sine wave pulse values with linear rise and fall transitions. Implements the abstract
TimeFunc()method fromWaveform.- Returns:
Function that takes time array and returns trapezoidal sine pulse values
- Return type:
function_handle