TanhSinePulse#
- class TanhSinePulse(options)#
Bases:
PartialPeriodicWaveformTanhSinePulsegenerates sine wave 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 sine pulse with rise and fall times pulse = TanhSinePulse(amplitude = 2.0, frequency = 1000, ... riseTime = 0.001, fallTime = 0.001); pulse.plot();
Example2:
% Create a pulse with only rise time pulse = TanhSinePulse(amplitude = 1.0, frequency = 500, riseTime = 0.002); pulse.plot();
- Constructor Summary
- TanhSinePulse(options)#
Construct a TanhSinePulse 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 sine pulse.
Creates a function handle that generates sine wave pulse values with hyperbolic tangent rise and fall transitions. Implements the abstract
TimeFunc()method fromWaveform.- Returns:
Function that takes time array and returns tanh sine pulse values
- Return type:
function_handle