PchipSinePulse#
- class PchipSinePulse(options)#
Bases:
PartialPeriodicWaveformPchipSinePulsegenerates sine wave pulses with PCHIP rise and fall transitions.Creates sine wave pulses with smooth rise and fall transitions using Piecewise Cubic Hermite Interpolating Polynomial (PCHIP) interpolation. Provides smoother transitions than linear ramps. Inherits from
PartialPeriodicWaveform.Example1:
% Create a PCHIP sine pulse with rise and fall times pulse = PchipSinePulse(amplitude = 2.0, frequency = 1000, ... riseTime = 0.001, fallTime = 0.001); pulse.plot();
Example2:
% Create a pulse with only rise time pulse = PchipSinePulse(amplitude = 1.0, frequency = 500, riseTime = 0.002); pulse.plot();
- Constructor Summary
- PchipSinePulse(options)#
Construct a PchipSinePulse 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 PCHIP sine pulse.
Creates a function handle that generates sine wave pulse values with PCHIP-interpolated rise and fall transitions. Implements the abstract
TimeFunc()method fromWaveform.- Returns:
Function that takes time array and returns PCHIP sine pulse values
- Return type:
function_handle