TanhPulse

TanhPulse#

class TanhPulse(options)#

Bases: PartialPeriodicWaveform, ConstantTop

TanhPulse generates pulses with hyperbolic tangent rise and fall transitions.

Creates sine wave pulses with smooth rise and fall transitions using hyperbolic tangent (tanh) functions. Provides smooth, sigmoid-like transitions for pulse shaping. Inherits from PartialPeriodicWaveform.

Example1:

% Create a tanh-shaped pulse with rise and fall times
pulse = TanhPulse(amplitude = 2.0, ...
                 riseTime = 0.001, fallTime = 0.001);
pulse.plot();

Example2:

% Create a pulse with only rise time
pulse = TanhPulse(amplitude = 1.0, riseTime = 0.002);
pulse.plot();
Constructor Summary
TanhPulse(options)#

Construct a TanhPulse 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 tanh-shaped pulse.

Creates a function handle that generates sine wave pulse values with hyperbolic tangent rise and fall transitions. Implements the abstract TimeFunc() method from Waveform.

Returns:

Function that takes time array and returns tanh-shaped pulse values

Return type:

function_handle